>Can you please explain what is wrong or what settings you have in SQLiteSpy. SQLiteSpy does not use any special settings. There are no tweaks to the database engine and no PRAGMAs are set when opening a database. >My test program is sorting table without index to see how much time it takes. >I have temp_store = 0 like it is in SQLiteSpy. > >When I repeat test, I get different times from 3 seconds to 220 seconds. Using >same SQL in SQLiteSpy takes aprox. same time around 4 seconds always (repeated >30 times). I do not know your program, but I notice that you timings vary considerably. This might hint at a memory fragmentation or memory manager issue. The SQLiteSpy memory manager is known to reduce fragmentation which might explain its very similar execution times. SQLiteSpy is also optimized to use as little memory as possible. So if you query is large, make sure your system does not have to swap to disk which considerably slows down performance. Ralf _______________________________________________ Delphi Inspiration mailing list yunqa@xxxxxxxxxxxxx //www.freelists.org/list/yunqa