Title: WordPress optimize page with multiple queries
Last modified: August 21, 2016

---

# WordPress optimize page with multiple queries

 *  [yedidel](https://wordpress.org/support/users/yedidel/)
 * (@yedidel)
 * [12 years, 3 months ago](https://wordpress.org/support/topic/wordpress-optimize-page-with-multiple-queries/)
 * Hello,
 * I have a wordpress one-page website that shows a table of posts (about 30-40).
   
   Each row in a table contains details about a post, and 5 columns of 6 “statuses”(
   a custom post type) that are linked to the post. Each status itself shows all“
   messages” (another custom post type) that are linked to the status.
 * So in total, I have to make 1 query for the posts, then 40 queries to get the“
   statuses” for each post, then 6*40 queries to get all messages for each status/
 * This results in a pretty high load time (about 5 sec), and this is with only 
   one user accessing.
 * I am trying to find if there is anyway to do this smarter with less queries, 
   assuming that “messages” can change every several minutes so I don’t know how
   much caching is an option.

The topic ‘WordPress optimize page with multiple queries’ is closed to new replies.

## Tags

 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * 0 replies
 * 1 participant
 * Last reply from: [yedidel](https://wordpress.org/support/users/yedidel/)
 * Last activity: [12 years, 3 months ago](https://wordpress.org/support/topic/wordpress-optimize-page-with-multiple-queries/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
