Afficher le nombre et la durée des requêtes dans WordPress

Parfois votre blog « rame ». La première chose à étudier dans ce cas est le nombre de requêtes et leur temps d’exécution. Pour connaître le nombre et la durée des requêtes dans la base de donnée nécessaire pour afficher une page donnée de votre site il faut introduire le code suivant là où l’on veut que ces données apparaissent (footer.php ou index.php) :
<?php echo get_num_queries(); ?> requêtes en <?php timer_stop(1); ?> secondes

En cas de problème (nombre de requêtes ou durée trop longue) il est assez difficile d’en connaître la cause. Les plugins peuvent être impliqué dans ce dysfonctionnement. Pour savoir si un plugin particulier pourrait être la cause du ralentissement de l’affichage de votre site, le plus simple est de désactiver les plugins un à un et de noter à chaque fois la durée et le nombre de requête effectuées.


Tags : ,
Trackbacks Commentaires
  • splitsch dit :

    Salut!
    Pour un blog comme le tient, c’est combien, l’affichage de la page d’accueil ?
    Histoire d’avoir un point de comparaison :)

    A noter que le ralentissement peut être dû à beaucoup d’autres paramètres: taille des photos/images/icônes trop grande, serveur en difficulté,…

    Aplus!

  • Adrien dit :

    WordPress est un excellent CMS ce n’est plus discutable. Mais nativement, il consomme beacoup de ressources. Il faut donc absolument penser à l’optimiser pour le rendre plus sûre et surtout plus rapide. Depuis que Google prend en compte le temps de chargement, il faut faire attention à cet ascpect. Pour certaines, cela prend du temps. Pour d’autres ça demandes quelques minutes.

  • Rose oil dit :

    J’utilise plus wordpress car trop long au chargement, je conseil tumblr le nouveau blog à la mode … bises Kitty xoxox

  • Merci bien pour ce petit code très simple à utiliser !! :)

  • egeronline dit :

    The Zebra, which has successfully resisted domestication, is a gifted defensemen. In captivity with other animals, they will often attack the very same species they cohabitate with in the wild. Stallions, in particular, are known to break the jaw of an attacking lion with a deft kick, and mothers and foals are so bonded (for three years) that attacks from wild dogs and others in the night elicit childlike screaming from the foals which quickly gathers mares in a knot around them. One story has a mare and her foals galloping off in a tight formation, skillfully repelling the attacking dogs. In daylight Zebras are common among Hyenas’, giraffes, and lions.

  • femmejordans dit :

    When we study the characteristic behavior of animals we can easily see the human condition. Sometimes it’s a poor reflection; but perhaps, meant to model the benefit in the likeness to them. As you consider the question that follows, you may want to review the animal behavior above. Which are you: mule, pig, fish, monkey, armadillo, or zebra? Choose wisely.

  • jazzil dit :

    I’ve been using the WP 3.0 multisite feature on a few of my domains now. It is a fantastic application if you have a broad niche that you want to exploit in several different ways, or if you have a lot of domains and want to streamline the site building process. There is a plugin to handle this for you, but I prefer to enable the install manually. I guess that I’m a masochist at heart.
    Recently, I built a niche portal site on the broad topic of « education. » I found an aged domain that was three years old and enabled the multisite feature on it. When you enable the multisite feature, you are able to run multiple blogs from a single WordPress dashboard. I built blogs on several education related topics, like student loans, textbooks, etc. and hosted them under the umbrella of of my main domain in subdirectories.

  • gededim dit :

    -Sweeten stockings with a Rubik’s Cube
    They probably have an app for that now, but there’s nothing like having the real thing. The

    Rubik’s Cube was the ultimate 3D puzzle. And who knows? It might still be.
    -Frame great memories with a vintage concert poster
    Is there someone on your shopping list who adores music? Did they follow a band during college?

    Or do they have every box set of DVDs from their favorite artist? Do they collect vinyl? Search

    eBay or Amazon for a vintage concert or festival poster. Check your local framing shops for

    holiday sales and specials on frames and services. The music enthusiast in your life will be

    thrilled to receive a blast from their past and will love their new piece of art far into the

    future.

  • -Wrap up a remote control airplane
    Certain to make the receiver nostalgic and put a smile on everyone’s face, a remote control

    airplane is a gift that adults can actually play with on Christmas morning!
    -Have a long winter’s nap on memory foam
    Remember what it was like to wake up with more energy than you knew what to do with? A great

    night’s sleep is possibly the best gift that anyone could receive. Make a huge impression (pun

    acknowledged) with a memory foam mattress, or let someone know you care by having « Santa » deliver

    memory foam pillows to his or her house this holiday season.

  • labtransmedia dit :

    So put on your warmest socks and lean back and relax, knowing your Christmas shopping list is

    ready to bring back memories and create new ones. And whatever you do, don’t forget to leave

    cookies and milk for Santa. Happy Holidays!

    John Booths is a fitness and body image consultant who works predominantly with women over 40 who

    want to stay fit and look young.  He writes about skincare with a focus on  aging

    skincare, sharing tips, ideas case studies and new skin care products.

  • style Galtie dit :

    WordPress est un excellent CMS ce n’est nike free run plus discutable. Mais nativement, il consomme beacoup de ressources

  • blogs plait dit :

    Les plugins peuvent être impliqué dans ce dysfonctionnement. Pour savoir si un plugin particulier nike free run pourrait être la cause du ralentissement de l’affichage de votre site

  • The main problem seems to be, the base is not wide enough and it wobbles and sometimes falls over. When that happens the ants usually die because the tunnels collapse. The idea is to make sure the tunnels do not collapse.
    The ants in this model are Carpenter Ants and they can give you a really good bite, so keep your fingers out of the cage. Also the color scheme is pretty bland. Mine was just straight green and no other color. Green box, green base and green silhouette farm scene on the top. At least Uncle Milton has some color in his farms.

  • The next one is another Uncle Milton, the Habitat-Sports Park and this is a bit better than the Ant Farm Village. It has got good viewing spheres with a couple of magnifying glasses as windows as you can get a close up view of the ants.
    The construction is pretty sturdy and it is supposed to be escape proof, but some people had their ants escape. I think it is all in the way it is put together, so read the instructions carefully. Some others had their ant farm invaded by other smaller ants. The big red ants are no match for the little black ants.
    This ant farm looks like a take off from one of those mouse exercise cages with climbing walls, vertical ramps and gravity hoops.

  • The last one we will look at is the Ant Hill from Insect lore. This is a very basic ant farm shaped like a cone so you have a three-dimensional viewing area the same as the Habitat-Sports Park. Here most of the activity goes on inside the sand dome so you only see the ants running around the outside of the hill. It has a very wide base so it is pretty stable. If you are a bit worried about having stinging ants running around the place this is probably the safest as it has a locking lid.
    My suggestion is if you are really into ants, buy one of the habitats then go and find your own ants. Find a good ant nest and grab the queen ant and a bunch of others then your ant farm should last a long time. Why wait for the ant to arrive in the mail. Also there is some debate about what species of ant you end up with if you order through the post. Just remember most ants bite so be careful.

  • view lethal dit :

    le plus simple est de désactiver les plugins un à un et de noter à chaque fois la durée et le nombre nike tn requin de requête effectuées

  • style jazz dit :

    Also there is some debate about what Timberland pas cher species of ant you end up with if you order through the post

  • arena Nicolas dit :

    La première chose à étudier nike air force 1 dans ce cas est le nombre de requêtes et leur temps d’exécution

  • plus simple dit :

    If you are a bit worried about having Timberland pas cher stinging ants running around but some people had their ants escape

  • visitors hebdo dit :

    La première chose à étudier dans ce cas est survetement armani le nombre de requêtes et leur temps d’exécution

  • twilight merchandise dit :

    Les plugins peuvent être impliqué dans nike tn pas cher ce dysfonctionnement

  • I built blogs on several education related topics, like student loans, textbooks, etc. and hosted them under the umbrella of of my main domain in subdirectories.Chemises Homme Also there is some debate about what species of ant you end up with if you order through the post. Just remember most ants bite so be careful.

  • main domain dit :

    Les plugins peuvent être impliqué dans chaussure air jordan ce dysfonctionnement

  • étudier dans dit :

    This is a very basic ant farm shaped like a cone so you have a chaussures Timberland three-dimensional viewing area the same as the Habitat-Sports Park.

  • le-gymnase dit :

    Sometimes it’s a poor reflection; but perhaps, meant to model the benefit in the likeness to them. http://www.le-gymnase.fr As you consider the question that follows, you may want to review the animal behavior above. Which are you: mule, pig, fish, monkey, armadillo, or zebra? Choose wisely.

  • Depuis que Google prend en compte le temps de chargement, il faut faire attention à cet ascpect. http://www.gaypodcast.fr/tn-pas-chere-livraison-gratuite-chaussure-nike-tn-requin-pas-cher.html Pour certaines, cela prend du temps. Pour d’autres ça demandes quelques minutes.

  • dadicar dit :

    Which are you: mule, pig, fish, http://www.dadicar.fr/Nike-Tn-Requin-Pas-Cher-s1959.html monkey, armadillo, or zebra? Choose wisely.

  • One story has a mare and her foals galloping off in a tight formation, skillfully repelling the http://www.lagarenne-dulac.fr/timberland-pas-cher-soldes-timberland-rouge.html attacking dogs. In daylight Zebras are common among Hyenas’, giraffes, and lions.

  • One story has a mare and her foals galloping off in a tight formation, skillfully repelling the http://www.lavilledesamoureux.fr/jordanpascher/nike-air-max-pas-cher-chine/ attacking dogs. In daylight Zebras are common among Hyenas’, giraffes, and lions.

Réagissez