Quantcast
Channel: mySQL Query seems to crash server - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by javier_domenech for mySQL Query seems to crash server

$
0
0

Try to add the final conditions to the joins (multiple join conditions).

If you use multiple conditions at joins instead of get a huge set and then put the condition at the end your set will be smaller and your response time may be better.

for instance, you have a final condition:

AND wp_posts.post_type = "event"

You could put it in the first join

INNER JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) AND wp_posts.post_type = "event"INNER JOIN...

and so on.


Viewing all articles
Browse latest Browse all 2

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>