WordPress.org

Ready to get started?Download WordPress

Forums

Improving query procedures (1 post)

  1. button999
    Member
    Posted 2 years ago #

    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.

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic