Title: 15+ Database SQL calls
Last modified: April 26, 2024

---

# 15+ Database SQL calls

 *  Resolved [John Kostly](https://wordpress.org/support/users/johnkostly1/)
 * (@johnkostly1)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/15-database-sql-calls/)
 * **SELECT** *
   **FROM** rjn_posts**WHERE** ID = 245**LIMIT** 1
 * You’re plugin is repeatedly calling this from the database, upto 15 times per
   page. It is pretty excessive, and is part of the performance issues I’m finding
   with my website. Its best to cache this in a variable and use it many times.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [John Kostly](https://wordpress.org/support/users/johnkostly1/)
 * (@johnkostly1)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/15-database-sql-calls/#post-17715864)
 * To be clear, the issue I have is on a dedicated server. My websites use highly
   advanced spectra based webpages with many features. My problems arrive when I
   clear the cache on my website. Usually right after saving a post. This crashes
   my dedicated website, as the new cache forms. I have definitely tracked this 
   back to over-usage of the database, and I have 100-200 calls to the database 
   when refreshing the page cache. This takes 2-4 seconds for a page to load. If
   there are bots on my website, this compounds until the database can’t handle 
   the load. I then see 500 errors.
 * I’ve done extensive troubleshooting on this. I’ve disabled all custom code, but
   spectra, and the situation continues. I have many, highly configured web pages
   with many spectra blocks on each one.
 * I’ve optimized the tables for WordPress, but haven’t touched the plugin ones.
   The errors I receive are across the board slow queries, until the stack is overcome,
   and the database catches up. The one query I provided isn’t the only duplicate
   queries happening, just one of them.
 * I’m also seeing a situation where WP_Options Transiants are deleted then add 
   again, instead of updated. This causes a table wide indexing, rather than a row
   specific indexing.
 * WP Rocket also plays a role in this, as their Pre-Loading and Critical CSS pages
   cause a large number of pages to start rendering in response to a cache clear.
   I’ve also had Alexa bots crash the website after a cache clear.
    -  This reply was modified 2 years, 1 month ago by [John Kostly](https://wordpress.org/support/users/johnkostly1/).
    -  This reply was modified 2 years, 1 month ago by [John Kostly](https://wordpress.org/support/users/johnkostly1/).
    -  This reply was modified 2 years, 1 month ago by [John Kostly](https://wordpress.org/support/users/johnkostly1/).
 *  [Mohsin Ghouri](https://wordpress.org/support/users/mohsinbsf/)
 * (@mohsinbsf)
 * [2 years, 1 month ago](https://wordpress.org/support/topic/15-database-sql-calls/#post-17718867)
 * Hi [@johnkostly1](https://wordpress.org/support/users/johnkostly1/),
 * Sorry for the inconvenience caused to you.
 * Our dev team is working on it. We will release an updated version of the plugin
   with the fix as soon as it is done.
 * Have a nice day!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘15+ Database SQL calls’ is closed to new replies.

 * ![](https://ps.w.org/ultimate-addons-for-gutenberg/assets/icon-256x256.gif?rev
   =3240412)
 * [Spectra Gutenberg Blocks – Website Builder for the Block Editor](https://wordpress.org/plugins/ultimate-addons-for-gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/ultimate-addons-for-gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/ultimate-addons-for-gutenberg/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Mohsin Ghouri](https://wordpress.org/support/users/mohsinbsf/)
 * Last activity: [2 years, 1 month ago](https://wordpress.org/support/topic/15-database-sql-calls/#post-17718867)
 * Status: resolved