/    Sign up×
Community /Pin to ProfileBookmark

Display Run Time of Query

I thought there would be a function to do what I am trying, but it seems it may be more complicated than I thought.

Is there a simple way to display some run-time information about an executed MySQL query? I figured there would be a pre-built function that displays information such as execution time, etc. But, I looked through PHP.net and searched Google and could nto come up with any thing.

to post a comment
PHP

5 Comments(s)

Copy linkTweet thisAlerts:
@bokehMay 31.2006 — PHPmyAdmin does this. You might need to make your own with microtime but it will only take runtime into account.
Copy linkTweet thisAlerts:
@ShmohelauthorMay 31.2006 — I realize that phpMyAdmin uses it.

However, I have built a ebugging system for a website I am developing. It is compiles all the queries run to produce a given page, and I was hoping to get some more information regarding the queries. Do you know how phpMyAdmin compiles the info? With what scripts?
Copy linkTweet thisAlerts:
@bokehMay 31.2006 — Just use microtime before and after and subtract the difference.
Copy linkTweet thisAlerts:
@blitzwebMay 31.2006 — I think it would be best if you can look at the code in phpmyadmin or other open source products like phpnuke, etc. Do not copy/paste ? Just have a look for a better understanding.
Copy linkTweet thisAlerts:
@ShmohelauthorMay 31.2006 — I put something together, pretty simple really. Thanks Bokeh.
×

Success!

Help @Shmohel spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...