query= SELECT T1.IP, T1.NUM, T2.IP_NUM, IFNULL(fwc.CNUM,0) AS IP_COUNTER, IFNULL(fwc.CNUM/T2.IP_NUM,0) AS IP_Rating, (T2.IP_NUM/T1.NUM) AS IP_R1 FROM ( SELECT COUNT( `IP` ) AS NUM, `IP` FROM `b_stat_hit` WHERE `DATE_HIT` >= DATE_SUB(now(), INTERVAL 600 SECOND) AND `USER_AUTH` = 'N' AND `URL` REGEXP '/shop/[[:alnum:]]+/[[:alnum:]]+/$|/shop/[[:alnum:]]+/[[:alnum:]]+/\\?|/equipment/' AND `IP`='91.201.215.211' HAVING COUNT(`IP`) >'5' ) AS T1 LEFT JOIN ( SELECT COUNT( `IP` ) AS IP_NUM, `IP` AS IP_ALL FROM `b_stat_hit` WHERE `DATE_HIT` >= DATE_SUB(now(), INTERVAL 600 SECOND) AND `URL` NOT LIKE '%recaptcha%' AND `USER_AUTH` = 'N' AND `IP`='91.201.215.211' ) AS T2 ON T1.IP = T2.IP_ALL LEFT JOIN ( SELECT COUNT(`ip_source`) AS CNUM,`ip_source` FROM `firewall_www_counter` WHERE `date_create`>= DATE_SUB(now(), INTERVAL 600 SECOND) AND `ip_source`='91.201.215.211' ) AS fwc ON T1.IP COLLATE utf8_general_ci = fwc.ip_source ;
NUM=, IP_NUM=, IP_COUNTER=, IP_Rating=, IP_R1=, rating=1
RR=1

Общее время выполнения=0.21151995658875 секунд