Accessing query time via DBI / DBD::MySQL

G

Graham Drabble

When you run a query in MySQL the last row returned is of the form:

4 rows in set (0.20 sec)

How can I get access to that time when using DBI / DBD::MySQL ?
 
E

Eric Schwartz

Graham Drabble said:
When you run a query in MySQL the last row returned is of the form:

4 rows in set (0.20 sec)

That's not actually part of the rows that are returned; it's something
the client prints out.
How can I get access to that time when using DBI / DBD::MySQL ?

perldoc -f time

-=ERic
 
G

Graham Drabble

That's not actually part of the rows that are returned; it's
something the client prints out.

Thanks, I hadn't realised that.
perldoc -f time

I had considered doing that, I was simply hoping there was something
built in since the figure above goes to .01 of a second and to do that
with time calls either side of the statement requires Time::HiRes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top