How to find out the execution time of a sql query...

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • pplers
    New Member
    • Apr 2007
    • 60

    How to find out the execution time of a sql query...

    I would like to know how to find out the exec time of a sql query, on mysql, to "echo-it" next to "Results: xx". Like any search engine.


    thanks

    p.s: i've heard that the timestamp can be used....
    Last edited by pplers; Jul 23 '07, 02:37 PM. Reason: .
  • mwasif
    Recognized Expert Contributor
    • Jul 2006
    • 802

    #2
    Get the value of microtime() before and after executing the query in separate variables. Get the difference of time that will be your query time.

    Comment

    Working...