We have a pretty popular poll/vote contest running using this plugin. However, we're seeing a lot of records pulled from database with this call:
SELECT filtered.sort, l.*, d.field_number, d.value
FROM wp_rg_lead l
INNER JOIN wp_rg_lead_detail d ON d.lead_id = l.id
INNER JOIN
( SELECT @rownum:=@rownum + 1 as sort, id
FROM
( SELECT distinct l.id
FROM wp_rg_lead l
INNER JOIN wp_rg_lead_detail d ON d.lead_id = l.id
WHERE l.form_id=11
AND status='active'
ORDER BY date_created DESC
LIMIT 2200,100
) page
) filtered ON filtered.id = l.id
ORDER BY filtered.sort
Is this by design? Seems like a lot of extra data being pulled out. Is there a way to optimize this call? here's the live contest:
http://www.canadianfamily.ca/contests/teacher-awards-voting-phase/
Thanks