• Hi everyone,
    i made a good website with wordpress with a lot of post, diveded into 20 categories. Now i have about 1k users each day and my hosting support write me that my wordpress site has long queries on the wp_term_relationships table, for example:

    # Query_time: 6.385550 Lock_time: 0.000150 Rows_sent: 3599 Rows_examined: 3599
    SET timestamp=1391784333;
    SELECT distinct object_id FROM wp_term_relationships WHERE 1=1 AND term_taxonomy_id IN (‘XX’);

    Now i realize that the problem is that the wp_term_relationships is really big and i need to limit the number of results for this queries. (for example adding LIMIT 0,200). For example if an user navigate the category X , i will show only the last 200 posts of this category.

    My question is:

    what is the best way to do this? I need to override one wordpress function or there is another way to solve this problem?

    Thank you very much.
    Riccardo

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Slow query in term_relationships’ is closed to new replies.