Category: MySQL
How to optimize slow queries caused by filtering many meta_query custom fields in WordPress.
If you are working with a custom post type that has many fields you might want to let users filter by those fields. This filtering can be very powerful. With the limitations of a MySQL and more specifically, WordPress’s metadata tables, filtering by custom fields can become slow. This post describes one such scenario, and…