Title: Admin queries
Last modified: August 21, 2016

---

# Admin queries

 *  [c_martin](https://wordpress.org/support/users/c_martin/)
 * (@c_martin)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/admin-queries/)
 * Hi Rachel,
 * First off, let me just say that I’m a big fan of this plugin, what it’s solving
   and the responsive support you’ve provided to users. I’ve been using it across
   several sites since 2012.
 * Lately, I’ve been creating more and more custom post types via the CPT-onomies
   plugin for the purpose of attaching them to other custom post types. However,
   the admin area of WordPress is starting to become somewhat unusable. For example,
   when viewing all the entries of one of the custom post types, the page takes 
   77.29 seconds to load. I installed Query Monitor and am seeing queries similar
   to the following as being the most time consuming:
 *     ```
       SELECT wpposts.ID, (
       SELECT COUNT(*)
       FROM wp_postmeta wpmeta
       INNER JOIN wp_posts wpmetaposts
       ON wpmetaposts.ID = wpmeta.post_id
       AND wpmetaposts.post_type IN ( 'blog','characters','classifications','comics','competitions','edd_discount','games','movieoptions','music','page','playlists','post','promotions','shows','stores','videos' )
       AND wpmetaposts.post_status = 'publish'
       WHERE wpmeta.meta_key = '_custom_post_type_onomies_relationship'
       AND wpmeta.meta_value = wpposts.ID ) AS count
       FROM wp_posts wpposts
       WHERE wpposts.ID IN ( '5309','5014','66921','67238','59025','66452','59047','59052','59018','1192','49','13269','57810','1522','67537','57809','2384','1649','59021','3094','1285','26906','9456','64701','1780','1404','37','38839','1085','1505','59039','59042','203','59023','59057','3626','59024','5820','2993','20951','67541','6212','1718','67623','1686','240','5856','59056','59027','235','236','46','3589','36','1760','5557','1018','239','2906','2636','59055','1493','2397','1481','67539','1561','59040','13287','1542','7561','1198','238','1804','20079','59028','67333','67226','59030','59053','59046','1838','1635','59041','1374','6096','34129','1465','1286','67536','4949','67543','4850' )
       AND wpposts.post_status = 'publish'
       ORDER BY wpposts.ID ASC
       ```
   
 * The above query was called by CPT_TAXONOMY->get_terms() and took 14 seconds to
   complete. Any ideas on what can be done to improve the load time for these types
   of queries?
 * Thanks so much
 * [https://wordpress.org/plugins/cpt-onomies/](https://wordpress.org/plugins/cpt-onomies/)

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

 *  [Rachel Cherry](https://wordpress.org/support/users/bamadesigner/)
 * (@bamadesigner)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/admin-queries/#post-4730948)
 * Hmm. That’s not good!
 * I’m quite literally just a few hours from getting on a plane to go on vacation
   so be patient with me and I’ll look into this as soon as I get back!
 *  Thread Starter [c_martin](https://wordpress.org/support/users/c_martin/)
 * (@c_martin)
 * [12 years, 2 months ago](https://wordpress.org/support/topic/admin-queries/#post-4731099)
 * Thanks for the update Rachel. Very much appreciated!
 *  [Whysy](https://wordpress.org/support/users/whysy/)
 * (@whysy)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/admin-queries/#post-4731208)
 * Hi,
 * Any update about this issue, i have exactly the same problem 🙁
 * Thanks.

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

The topic ‘Admin queries’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cpt-onomies_f2f2f2.svg)
 * [CPT-onomies: Using Custom Post Types as Taxonomies](https://wordpress.org/plugins/cpt-onomies/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cpt-onomies/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cpt-onomies/)
 * [Active Topics](https://wordpress.org/support/plugin/cpt-onomies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cpt-onomies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cpt-onomies/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [custom post type](https://wordpress.org/support/topic-tag/custom-post-type/)
 * [queries](https://wordpress.org/support/topic-tag/queries/)
 * [taxonomy](https://wordpress.org/support/topic-tag/taxonomy/)
 * [terms](https://wordpress.org/support/topic-tag/terms/)

 * 3 replies
 * 3 participants
 * Last reply from: [Whysy](https://wordpress.org/support/users/whysy/)
 * Last activity: [11 years, 11 months ago](https://wordpress.org/support/topic/admin-queries/#post-4731208)
 * Status: not resolved