##gns 推送存储过程。每次需要删除原来的。
DELIMITER $$
DROP PROCEDURE IF EXISTS test_insert $$
create procedure test_insert
( a int)
begin
declare i int;
declare str VARCHAR(15);
declare result_str VARCHAR(30);
set str='PNXIA';
set result_str='';
set i=1;
WHILE i <= a DO
SET result_str = CONCAT(str,i);
SET i = i + 1;
insert into `push_notice` (`pn_no`, `user_no`, `registration_id`, `title`, `alert`,
`platform`, `state`, `result`, `reason_code`, `reason_desc`, `extras`, `date_gen`, `date_send_start`, `date_send_end`) values(result_str,'UR1209192899439251456','18071adc03020a4fee3','免息券领取通知','免息券到手,借款5000元可免7日利息。简直白拿!马上用起来>>','all','NOTSEND','',NULL,NULL,NULL,'2017-01-07 13:31:54','2017-01-07 17:18:21','2017-01-07 17:18:21');
END WHILE;
end $$;
call test_insert(100);
select * from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' AND date_send_end >DATE_FORMAT('2017-01-09 10:47','%Y-%m-%d %H:%i')
delete from push_notice where pn_no like 'PNXIA%';
select DATE_FORMAT(date_send_end,'%Y-%m-%d %H:%i'),count(*) from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' and date_send_end>date_created and date_created>DATE_FORMAT('2017-01-09 10:47','%Y-%m-%d %H:%i') GROUP BY DATE_FORMAT(date_send_end,'%Y-%m-%d %H:%i')
select UNIX_TIMESTAMP(date_send_end)-UNIX_TIMESTAMP(date_created) from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' AND date_send_end>date_created AND date_created>DATE_FORMAT('2017-01-09 10:40','%Y-%m-%d %H:%i')
100个
并发数 推送的平均时间
100 13.77ms
200 26.6ms
400 59.92ms 有 RESULT ='FAIL' code_reason=2002 119 errors 29.7% Request times of the app_key exceed the limit of current time window
DELIMITER $$
DROP PROCEDURE IF EXISTS test_insert $$
create procedure test_insert
( a int)
begin
declare i int;
declare str VARCHAR(15);
declare result_str VARCHAR(30);
set str='PNXIA';
set result_str='';
set i=1;
WHILE i <= a DO
SET result_str = CONCAT(str,i);
SET i = i + 1;
insert into `push_notice` (`pn_no`, `user_no`, `registration_id`, `title`, `alert`,
`platform`, `state`, `result`, `reason_code`, `reason_desc`, `extras`, `date_gen`, `date_send_start`, `date_send_end`) values(result_str,'UR1209192899439251456','18071adc03020a4fee3','免息券领取通知','免息券到手,借款5000元可免7日利息。简直白拿!马上用起来>>','all','NOTSEND','',NULL,NULL,NULL,'2017-01-07 13:31:54','2017-01-07 17:18:21','2017-01-07 17:18:21');
END WHILE;
end $$;
call test_insert(100);
select * from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' AND date_send_end >DATE_FORMAT('2017-01-09 10:47','%Y-%m-%d %H:%i')
delete from push_notice where pn_no like 'PNXIA%';
select DATE_FORMAT(date_send_end,'%Y-%m-%d %H:%i'),count(*) from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' and date_send_end>date_created and date_created>DATE_FORMAT('2017-01-09 10:47','%Y-%m-%d %H:%i') GROUP BY DATE_FORMAT(date_send_end,'%Y-%m-%d %H:%i')
select UNIX_TIMESTAMP(date_send_end)-UNIX_TIMESTAMP(date_created) from push_notice where pn_no like 'PNXIA%' AND registration_id = '18071adc03020a4fee3' AND date_send_end>date_created AND date_created>DATE_FORMAT('2017-01-09 10:40','%Y-%m-%d %H:%i')
100个
并发数 推送的平均时间
100 13.77ms
200 26.6ms
400 59.92ms 有 RESULT ='FAIL' code_reason=2002 119 errors 29.7% Request times of the app_key exceed the limit of current time window