Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

In psql, with \timing on, query times are displayed in milliseconds + hundredths of milliseconds. In MySQL, they are only displayed in seconds + hundredths of seconds. Is there a way to get MySQL to display them in milliseconds too (I'm trying to compare queries, but the small times just come out as zero in MySQL, which isn't very helpful).

share|improve this question
    
Try set profiling=1; As suggested in stackoverflow.com/questions/2825838/… –  wkoot Sep 16 '12 at 11:09

1 Answer 1

For a test/check session you can enable the Slow Query Log and setting the sysvar long_query_time to 0

The minimum and default values of long_query_time are 0 and 10, respectively. The value can be specified to a resolution of microseconds. For logging to a file, times are written including the microseconds part. For logging to tables, only integer times are written; the microseconds part is ignored

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.