I want to measure the execution time of each sql statement in sqlite.
I understand in sqlite shell you could just do .timer on, but I am wondering how to do it in a pogrammerable way so that I could know how much time a sql statement takes when applications are accessing the database at real time, not just by replaying that statement in a shell afterwards?
Could I just provide a plugin function for sqlite_profile?
Thanks a lot
After reading the code of shell.c I found the following relevant information on top of the file:
This means, SQLite does not provide some sort of that profiling itself, so you have to use your language features (e.g. endtime-startime) to do the job.