Title: Excesive SQL Query
Last modified: January 29, 2022

---

# Excesive SQL Query

 *  [MedvidekPU](https://wordpress.org/support/users/medvidekpu/)
 * (@medvidekpu)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/excesive-sql-query/)
 * Found following excessive SQL query running
 * Query lenght: 0.679716 s
    Dotaz: # Rows_affected: 0 Bytes_sent: 20788958
 * SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id IN (17,19,20,27,58,63,64,85,87,88,90,91,93,96,97,98,99,102,105,107,116,122,133,138,140,143,150,155,157,159,166,172,178,185,190,191,193,202,205,206,208,209,213,214,217,224,228,232,236,240,244,248,252,256,260,266,270,274,278,284,291,295,299,303,315,317,323,327,331,3
 * … goes on and on for ALL IDs, thousands of them
 * 116,16118,16120,16121,16123,16129,16130,16147,16148,16182,16183,16198,16199,16203,16204,16218,16219)
   ORDER BY meta_id ASC;`
 * After lot of diggin found, it’s caused by this Theme.
 * Every time when media is loaded (example: [https://pooh.cz/2020-10-27-08_59_15-ceska-posta/](https://pooh.cz/2020-10-27-08_59_15-ceska-posta/))
   it calls update_meta_cache functions which generates above mentions SQL query–
   in case of this web it returns over 20 MB of data and leadds in PHP errors and
   sQL problems.
 * I love this theme, but in current state it cannot be used.

The topic ‘Excesive SQL Query’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/amphibious/1.0.1/screenshot.png)
 * Amphibious
 * [Support Threads](https://wordpress.org/support/theme/amphibious/)
 * [Active Topics](https://wordpress.org/support/theme/amphibious/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/amphibious/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/amphibious/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [MedvidekPU](https://wordpress.org/support/users/medvidekpu/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/excesive-sql-query/)
 * Status: not resolved