1753939 Members
9330 Online
108811 Solutions
New Discussion юеВ

query execution speed

 
prem_4
Occasional Advisor

query execution speed

is there any way to obtain the execution speed of the queries executed in mysql so that i can use it to store i a table and use it measure performance.

6 REPLIES 6
Tim Sanko
Trusted Contributor

Re: query execution speed

If they are being run from the command line,

try time, or times.
Caesar_3
Esteemed Contributor

Re: query execution speed

Hello!

If you use oracle you have tools for check
performances of the sql and other operation in the DB.

Caesar
twang
Honored Contributor

Re: query execution speed

No yet, I don't see mysql have such management function yet. As tim mentioned you might need to measure it's perf using command line collected statistics.
Michael Steele_2
Honored Contributor

Re: query execution speed

Look into Oracle's

a) 'cost-based optimizer'.
b) sql trace
c) tkprof
d) SQL analyze
e) autotrace
f) explain plan
g) optimizer_mode
h) dbms_stats
Support Fatherhood - Stop Family Law
Michael Tully
Honored Contributor

Re: query execution speed

Use the 'time' or 'timex' command for this type of performance gathering. You could easily wrap it up into a shell script. See the man pages for the details on the commands.


regards
Michael
"When I have trouble spelling, it's called fat finger syndrome"
Anyone for a Mutiny ?
prem_4
Occasional Advisor

Re: query execution speed

hi !
thanx all for replying!
but if i have to use time,times or timex,.. how can i fetch it from a c program.
is there a function in C , perl etc to get the execution time.