Title: Improving query procedures
Last modified: August 20, 2016

---

# Improving query procedures

 *  [button999](https://wordpress.org/support/users/button999/)
 * (@button999)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/improving-query-procedures/)
 * Hello!
 * As the functionalities of my new webpage are almost complete, I’ve decided to
   work some more on loading speeds. As it turns out, I’ve detected many query calls
   on each page load using “Debug Queries” plugin (sometimes around 30, but going
   towards about 40 – 50). I’ve removed some of the calls using empty options trick
   from [Yoast](http://yoast.com/wordpress-performance-optimization/).
 * What I’ve realized is that each new `WP_query` or `query_posts` call can generate
   several SQL queries, in some instances it creates six calls to the database! 
   Is it possible to reduce these calls somehow or should I create a custom query
   and call it only once? The queries do not take that long to load, but there’s
   the function call overhead and everything, so I’d like to simplify it as much
   as possible. My question is how to do this properly? Is there a proper way of
   customizing the WP_query class to produce the smallest amount of queries possible?
 * Also, I know about the caching capabilities and I intend to use some plugin for
   it, but I would still like to improve my functions. What is your take on this?
 * Thanks for any info.

The topic ‘Improving query procedures’ is closed to new replies.

## Tags

 * [database](https://wordpress.org/support/topic-tag/database/)
 * [query](https://wordpress.org/support/topic-tag/query/)
 * [speed](https://wordpress.org/support/topic-tag/speed/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [button999](https://wordpress.org/support/users/button999/)
 * Last activity: [14 years, 1 month ago](https://wordpress.org/support/topic/improving-query-procedures/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
