Title: query counter
Last modified: August 18, 2016

---

# query counter

 *  [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/)
 * Is there a plugin to show the number of query of every page ?

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

 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489026)
 * no, the code is too simple:
 * `<?php echo $wpdb->num_queries; ?>`
 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489030)
 * 264 queries ?? Is normal ?
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489031)
 * nope, thats pretty damn high if you ask me.
 *  [whooami](https://wordpress.org/support/users/whooami/)
 * (@whooami)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489032)
 * I use 36 different plugins. I use anywhere from 54 to 73 queries on any one of
   my pages. Im guessing your page load times suck.
 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489033)
 * i use this code to show 3 loop in the index.php:
 * `<?php $wp_query->query_vars["cat"] = 11; ?>
    <?php $wp_query->query_vars["showposts"]
   = 3; ?> <?php $wp_query->get_posts(); ?> <?php if (have_posts()) : while (have_posts()):
   the_post(); ?>
 * if i delete the 3 loop i have 37 queries…
 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489035)
 * the problem is this code:
 * ` <?php if (have_posts()) : while (have_posts()) : the_post(); ?>`
 * <div class="postcontent" id="post-<?php the_ID(); ?>">
    <h1><a href="<?php echo
   get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?
   >"><?php the_title(); ?></a></h1>
 *  <div class="storycontentgallery">
    <?php the_content('Read more...'); ?> </div
   >
 *  <!--
    <?php trackback_rdf(); ?> -->
 *  <br />
    <br />
 *  <?php comments_template(); // Get wp-comments.php template ?>
 *  </div>
 * <?php endwhile; else: ?>
    <h2 class="center">Not Found</h2> <p class="center"
   ><?php _e("Sorry, but you are looking for something that isn't here."); ?></p
   > <?php endif; ?>
 * if i delete this i have 250 queries less
 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489037)
 * i’ve found the problem!! This plugin fuck the queries:
 * WP Automatic Reference
 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489040)
 * Now i have 58 queries for the homepage, 40 for the rest
 *  [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * (@gamerz)
 * [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489073)
 * i think anything less than 50 is ok

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

The topic ‘query counter’ is closed to new replies.

 * 9 replies
 * 3 participants
 * Last reply from: [Lester Chan](https://wordpress.org/support/users/gamerz/)
 * Last activity: [19 years, 5 months ago](https://wordpress.org/support/topic/query-counter/#post-489073)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
