Title: query_posts Performance
Last modified: August 19, 2016

---

# query_posts Performance

 *  [shoffy](https://wordpress.org/support/users/shoffy/)
 * (@shoffy)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/query_posts-performance/)
 * I’m curious… does anyone know if adding additional parameters to query_posts()
   would improve / degrade performance?
 * In other words, could providing criteria to limit the result set speed it up 
   or slow it down.
 * According to this site: [How expensive is a WHERE clause in MySQL?](http://www.mysqlperformanceblog.com/2008/10/31/how-expensive-is-a-where-clause-in-mysql/),
   it would slow things down.
 * So in an attempt to answer my own question… it would best to include only the
   parameters that make the biggest difference? Quality over quantity of WHERE statements?

Viewing 1 replies (of 1 total)

 *  Thread Starter [shoffy](https://wordpress.org/support/users/shoffy/)
 * (@shoffy)
 * [16 years, 5 months ago](https://wordpress.org/support/topic/query_posts-performance/#post-1254546)
 * To add to the above… I found that by removing unnecessary parameters from query_posts()
   that it does speed things up.
 * Sweet.
 * Now I’m thinking about is what happens if you include an invalid parameter. (
   i.e. exclude a category ID that doesn’t exist in the database)

Viewing 1 replies (of 1 total)

The topic ‘query_posts Performance’ is closed to new replies.

## Tags

 * [MySQL](https://wordpress.org/support/topic-tag/mysql/)
 * [performance](https://wordpress.org/support/topic-tag/performance/)
 * [query_posts](https://wordpress.org/support/topic-tag/query_posts/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [shoffy](https://wordpress.org/support/users/shoffy/)
 * Last activity: [16 years, 5 months ago](https://wordpress.org/support/topic/query_posts-performance/#post-1254546)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
