Hi.
I'm testing these two query

Code SQL:
SELECT `np_petition`.`id`, COUNT(np_sign.id) AS `total_sign` 
FROM `np_petition` 
INNER JOIN `np_sign` ON np_petition.id = np_sign.petition_id 
WHERE (np_petition.STATUS = 'approved' OR np_petition.STATUS = 'confirmed' OR np_petition.STATUS = 'stopped') 
GROUP BY `np_petition`.`id` 
ORDER BY `np_petition`.`registration_datetime` DESC
 
SELECT `np_petition`.`id`, COUNT(np_sign.id) AS `total_sign` 
FROM `np_petition` 
INNER JOIN `np_sign` ON np_petition.id = np_sign.petition_id 
WHERE np_petition.STATUS IN ('approved' ,'confirmed' , 'stopped') 
GROUP BY `np_petition`.`id` 
ORDER BY `np_petition`.`registration_datetime` DESC

The first took 8.3 secs
the second 11.5

but IN should be better of multiple where ?

Bye


Be patience :P