Forum Replies Created

Viewing 1 replies (of 1 total)
  • Okay. I did edit the SQL query in /wp-admin/includes/template.php(line 674, WP 4.2) from

    SELECT meta_key
    FROM wp_postmeta
    GROUP BY meta_key
    HAVING meta_key NOT LIKE '\\_%'
    ORDER BY meta_key
    LIMIT 30

    to

    SELECT DISTINCT(meta_key)
    FROM wp_postmeta
    WHERE meta_key NOT LIKE '\\_%'
    ORDER BY meta_key
    LIMIT 30

    I know I’m not supposed to edit the core files but this improved the query load from 1.5850 seconds to 0.1873 sec seconds on a 513,485 rows table.

    I tried to add some data to the custom fields of a post and they remain exclusive to that post only. No other post was affected.

    This is highly experimental and I haven’t tested this workaround thoroughly.

Viewing 1 replies (of 1 total)