Created
November 1, 2017 18:09
-
-
Save hackmods/3c8d19efe9b71acbc64a8e0fba75df00 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- use wp_sample; | |
-- select * from wp_posts group by post_date order by post_name; | |
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS wp_sample.vx_multiple_select $$ | |
CREATE PROCEDURE wp_sample.vx_multiple_select() | |
BEGIN | |
DECLARE l INT DEFAULT 0; | |
declare tmp INT default 0; | |
declare startTime datetime; | |
declare endTime datetime; | |
SET startTime = (Select current_timestamp); | |
WHILE (l < 10000) DO | |
select sum(id) into @tmp from wp_posts; | |
-- set @vnull := (select id INTO vnull from wp_posts where id = 1); -- order by post_date; | |
-- set tmp = (select * from wp_posts group by post_date order by post_date); | |
SET l = l + 1; | |
END WHILE; | |
SET endTime = (Select current_timestamp); | |
select TIMESTAMPDIFF(second, startTime, endTime); | |
END $$ | |
DELIMITER ; | |
CALL wp_sample.vx_multiple_select(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment