Query length

  • Greetings Rachel,

    I still have a problem with the plugin. The number of queries is low, but the query time is long. Here is an example from the admin (backend). The query length is 22.6 seconds :

    SELECT wpposts.ID, (
    FROM wp_postmeta wpmeta
    INNER JOIN wp_posts wpmetaposts
    ON wpmetaposts.ID = wpmeta.post_id
    AND wpmetaposts.post_type IN ( ‘actualites’,’commentaire-lecture’,’post’ )
    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 ( ‘1248’,’1249′,’1250′,’1251′,’1252′,’1253′,’1254′,’1255′,’1256′,’1257′,’1258′,’1259′,’1260′,’1261′,’1262′,’1263′,’1264′,’1265′,’1266′,’1267′,’1268′,’1269′,’1270′,’1271′,’15469′,’1207′,’1208′,’1209′,’1210′,’1211′,’1212′,’1213′,’1214′,’1215′,’1216′,’1217′,’1218′,’1219′,’1220′,’1221′,’1222′,’1223′,’1224′,’1225′,’1226′,’1227′,’1228′,’1229′,’1230′,’1231′,’1232′,’1233′,’1234′,’1235′,’1236′,’1237′,’1238′,’1239′,’1240′,’1241′,’1242′,’1243′,’1244′,’1245′,’1246′,’1247′ )
    AND wpposts.post_status = ‘publish’
    ORDER BY wpposts.ID ASC

    Thank you again!


Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author Rachel Carden


    Hmm. I wonder why it’s so long? That doesn’t seem like too crazy of a query.

    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!

    Greetings Rachel,

    Do you have any news about my issue?

    We have changed the server for the site, things are quite better, but we still have a 10 seconds loading time with some pages, especially the ones with CPT-onomies.

    Thank you!

    Plugin Author Rachel Carden


    Looking into it right now! 🙂

    I don’t know if it can help you figure it out, but I can send you a direct link to the pages that cause problems.

    Plugin Author Rachel Carden


    Please do. I’m so sorry. My time is just… not my own. Plus it’s hard for me to test this kind of stuff. I wonder if the part of the query that gets the term count is what’s slowing it down. Do you use the term count at all?

    Since this site has currently content that can’t be public, I have sent you the link via your website’s webform.

    The site is for a magazine. There is that “number” cpt that is associated to book comments, articles and other ctp.

    On the “number” page, I load every content associated to it. Here is a sample of the code used :

    if( $commentaires ) {
    							   ?><h3>Commentaires de lecture</h3>
    								  foreach ( $commentaires as $commentaire ) {
    									 ?><li><a href="<?php echo get_permalink( $commentaire->ID ) ?>" title="<?php echo get_the_title( $commentaire->ID ); ?>"><?php echo get_the_title( $commentaire->ID ); ?></a></li><?php
    Plugin Author Rachel Carden


    I just setup something in my testing environment and it’s dragging the load so hopefully I’ll have an answer here soon.

    Plugin Author Rachel Carden


    I uploaded 2900 posts to test load time and just querying the posts alone makes for a slow query, let alone CPT-onomies.

    Still looking…

    I’m planning on using W3 Total Cache plugin, which will help with the loading speed.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Query length’ is closed to new replies.