Improving wpdb queries with large data

Caching is Your Friend

I understand your frustration with adding another plugin, but a method for extending WordPress cache is highly recommended for any WordPress sites getting any kind of traffic. These plugins allow WordPress to store cache somewhere better suited for storing and quickly accessing this data, such as Memcache, Redis, or even in the local file structure.

  1. W3 Total Cache offers the widest variety of destinations for cache.
  2. WP Super Cache offers very quick access to file cache.
  3. Batcache offers direct access to Memcache.
  4. Redis Cache offers direct access to Redis cache.

At the end of the day, it all depends on what’s available on your server.

In my opinion, wp_cache is the way to go for what you need. It will allow you to store these values for quick access later using a much faster technology than storing them in the database.