WP_Query Performance Issues with meta_query

Custom field data is stored in the postmeta table, and it’s likely that scanning through this table is causing slowness.

You should:

  • install the debug bar plugin which will give you more insight into the queries that are being executed against the database – you’ll be able to see how long each query takes, and the actual SQL code that’s being executed.
  • Find the queries that are taking a long time to run, and EXPLAIN them. This will give you a much better idea of what’s going on, and how to proceed.