Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
564 views
in Technique[技术] by (71.8m points)

profiling - Is there a tool to profile sqlite queries?

I am using a SQLite database and would like to speed up my queries, perhaps with indexes or by restructuring them altogether.

Is there a tool to profile queries, that might help me decide where things are slowing down?

I know I could just enter queries into a tool like SQLite Administrator to time them, but I'm looking for something a bit more systematic than that -- perhaps something that sits in the background and looks at all the queries that I enter over a period, giving a breakdown of any bottle necks.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

This will only answer one part of the question (the most unhelpful part, unfortunately).

I googled this up because I was looking for something to time queries and the sqlite3 client has a timer meta command.

sqlite> .timer on

from there on in, all query results will have cpu timer statistics appended. Hope this helps at least a little bit.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...