PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

popular polls load on server

  1. 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

    Posted 10 years ago on Tuesday May 28, 2013 | Permalink
  2. David Peralty

    I sent a note to the development team.

    Posted 10 years ago on Tuesday May 28, 2013 | Permalink
  3. David Peralty

    Sent you a new version of the Polls add-on. Give it a try.

    Posted 10 years ago on Thursday May 30, 2013 | Permalink
  4. Hmm, the results page definitely loads faster, but it's not showing all the stats:

    http://www.canadianfamily.ca/contests/teacher-awards-current-results/

    each candidate (in the back-end) is showing significantly more votes. Is this a cache issue, or totals are not calculated correctly? Please advise...

    Posted 10 years ago on Friday May 31, 2013 | Permalink
  5. The Polls Add-On does use caching, so there will be a delay. On forms with thousands of entries, the delay could be long (12 hours or so). How many entries do you have, and which version of the Polls Add-On are you running?

    Posted 10 years ago on Friday May 31, 2013 | Permalink
  6. we have over 20k entries, and are running 1.4.5 version of polls. The 'results' page still keeps fluctuating:

    http://www.canadianfamily.ca/contests/teacher-awards-current-results/

    Posted 10 years ago on Wednesday June 5, 2013 | Permalink
  7. Ok, so you do have a lot of entries and is running the latest version of the Polls Add-On which does use caching, so the delays you see are normal. I would imagine that the delay for 20k would be many hours. Given the complexity of building the cache, there isn't anything that we can do to make it any faster, so unfortunately this is a limitation we currently have.

    Posted 10 years ago on Wednesday June 5, 2013 | Permalink
  8. I wouldn't mind the cached results being delayed, if they were accurate. But it seems only partial results are generated:

    http://www.canadianfamily.ca/contests/teacher-awards-current-results/

    for example, Sue is showing 624 votes, but in the back-end, it shows she has 2238 votes. Similar with another 'popular' candidate - Sharon is showing 773 votes in front-end, but the back-end stats have her receive over 3800 votes.

    Is it possible that results are pulled out partially because database queries time out? Is there a way to fix it?

    Thanks in advance for your suggestions.

    Posted 10 years ago on Wednesday June 5, 2013 | Permalink
  9. Indeed, seems we're talking about the same issue here: http://www.gravityhelp.com/forums/topic/poll-results-different-on-front-end-than-from-back-end?replies=1#post-340278

    Another thing to note is that we've noticed a strange behavior, that seems beyond using cache, because we've documented the results being smaller than those shown on backend, then at some point they got almost accurate when they went up, and then again we've seen them go back down. I've tried and tried to figure this out but I'm out of clues.

    Please respond to this ASAP

    Posted 10 years ago on Monday June 24, 2013 | Permalink
  10. Richard Vav
    Administrator

    If you still require assistance with this please open a new support ticket or a priority support ticket if you are a developer license holder. Thank you.

    Posted 10 years ago on Sunday July 28, 2013 | Permalink

This topic has been resolved and has been closed to new replies.