SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast nerf's Avatar
    Join Date
    May 2004
    Location
    Sunshine Coast, Australia
    Posts
    42
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how many queries and execution time

    Hi, does anyone know the commands to display how many queries were executed and how long the execution time was ?

    Yeah its for a PHP page.
    Thanks

  2. #2
    SitePoint Evangelist ghurtado's Avatar
    Join Date
    Sep 2003
    Location
    Wixom, Michigan
    Posts
    591
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by nerf
    Yeah its for a PHP page.
    Then you should probably have this question moved to the PHP forum.

    In a nutshell, there isn't a single "command" to display the queries executed in one page, or the page execution time for that matter, you will have to build your application with some kind of logger that keeps track of every query generated so that it can be displayed at the end of the page. As far as the time that takes to render a page, try something like this

    PHP Code:
    <?php
    $time_start 
    microtime(true);

    // your page contents go here

    $time_end microtime(true);
    $time $time_end $time_start;
    ?>
    (taken from http://us4.php.net/microtime)
    Garcia


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •