• SELECT option_value
    FROM wp_options
    WHERE option_name = ‘rewrite_rules’
    LIMIT 1 this query is takes 13 sec to execute and causing slow wp-admin . Size of value rewrite_rules option_value is greater than 15 MB.

    Please Help to how to optimize this query.

    Thanks in Advance

    • This topic was modified 1 year, 3 months ago by snehashinde.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    The query only returns one item. Granted it is quite large, but size alone does not explain 13 sec (!) execution time. You can try reducing the option’s size. First try going to the permalinks settings screen. This flushes existing rules and regenerates them. Doing this could remove superfluous rules.

    If the size remains unchanged, they are all legitimate rules, mostly added by your theme and plugins. The only way to further reduce the size is to eliminate any modules responsible for a large number of rules. Even if you were to do so, I doubt it would help much, if at all. IMO the problem lies elsewhere.

    There could be a lot of options saved that you don’t really need, such as old transients. Consider using one of the database clean up plugins.

    Through the phpMyAdmin app, you can defragment and optimize the table. Be sure to back up the table before performing these operations.

    It may be your DB needs more hardware resources to perform well. Ask your host what your options might be regarding hardware resource.

    Thread Starter snehashinde

    (@snehashinde)

    @bcworkz Thank you for your help. I reduced Option table size now problem resolved some extent.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘rewrite_rules option values size is greater than 15 MB. causing slow admin’ is closed to new replies.