Determining execution time of queries in SQLite
I am creating a program for analyzing and generating queries. I was curious if there currently exists a me开发者_运维技巧thod within SQLite such that I could query the time taken for a query to process? I am unable to modify my install in any way, so this method needs to work out of the box. I am writing my tool in python, and although I guess I could use the timer class to time execution -this method will not work when I am connecting to remote machines (and return a consistent timing.)
From within the sqlite3 command-line program you can do:
.timer ON
select * from my_table;
This will print the CPU time taken for the query.
精彩评论