十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
MySQL> CREATE PROCEDURE pro_testdata(IN inr int)
八步网站建设公司创新互联建站,八步网站设计制作,有大型网站制作公司丰富经验。已为八步上千余家提供企业网站建设服务。企业网站搭建\成都外贸网站制作要多少钱,请找那个售后服务好的八步做网站的公司定做!
-> BEGIN
-> DECLARE i INT DEFAULT 0;
-> START TRANSACTION;
-> WHILE i
-> INSERT INTO testdata(id,name) values(i,'gechong');
-> SET i=i+1;
-> END WHILE;
-> COMMIT;
-> END &&
Query OK, 0 rows affected (0.00 sec)
mysql>
mysql> DELIMITER ;
mysql> call pro_testdata(1000000);
Query OK, 0 rows affected (10.37 sec)
mysql> SELECT COUNT(1) FROM testdata;
+----------+
| COUNT(1) |
+----------+
| 1000000 |
+----------+
1 row in set (0.00 sec)
mysql> CALL pro_testdata(10000);
Query OK, 0 rows affected (0.10 sec)
mysql> SELECT COUNT(1) FROM testdata;
+----------+
| COUNT(1) |
+----------+
| 1010000 |
+----------+
1 row in set (0.00 sec)