Support » Plugin: WP-Polls » Lack of mysql index causes major performance issue for busy blogs

  • Resolved archon810

    (@archon810)



    Hey Lester,

    So, as you know, AndroidPolice uses your wp-polls plugin for over 200 polls now, but I started noticing that the db performance has been subpar and some queries hang for quite a bit now.

    After analyzing and tuning it, I found that there’s a major performance issue with wp-polls because it issues queries that don’t use an index and end up doing a full table scan. The table in question is now over 900k rows. As you can imagine, it’s less than desirable.

    I’ve played around with some indexes and resolved the issue – the query in question now uses the new index and only scans 1 row.

    See the gist below which shows:

    1. the original query before the index that does a full scan
    2. first unsuccessful attempt at an index
    3. successful index
    4. original query again

    I’ve added the index manually, but you should probably sort out the plugin to create it on the next update, as well as for fresh installs.

    https://gist.github.com/archon810/0f6bb97e5a7e29e4d1e9

    https://wordpress.org/plugins/wp-polls/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Lack of mysql index causes major performance issue for busy blogs’ is closed to new replies.