PDO instruction execution time

How to determine the time it took to execute on the database server with PDO?

I am using MySQL. Most utilities for MySQL clients seem to be able to show how long the query has been running on the server, regardless of the total time that involves transmitting the result over the network. It makes me think that the native MySQL API offers this information somewhere. Is it detected in PDO? If so, how can I get to it?

Note. I found the MySQL query method, but would prefer not to execute more instructions just for this if the runtime is already being tracked somewhere else. If it is not, I will return to this method.

+4
source share
1 answer

There seems to be no way to do this at the PDO level. Looking back, this makes a lot of sense, since PDO abstracts all the functions specific to the database.

+1
source

Source: https://habr.com/ru/post/1345395/


All Articles