189 8069 5689

mysql测试表

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)


分享标题:mysql测试表
网页地址:http://jkwzsj.com/article/gcjgej.html