lua - sqlite first executed query slow after opening connection -


i create sqlite3 database (using sqlite expert professional) 1 table , more 500,000 records; if command simple query like:

select * tableone entry 'book one' 

if it's first command executed after connecting database, takes considerably long time executed , retrieve result(~15seconds) after first command, comes normal , every command executes acceptable speed;

even if close application(i use pure lua sqlite modules)(and within it's logic, reasonably close connections) long windows(8 x64) running not restarted, every command first 1 executes after restarting windows, again, first command slow executed;

what reason? how can prevent this?

most after first time run this, you've loaded cache data, subsequent queries fast. have index on entry? index allow efficient querying using entry filter. may want create one:

create index i_tableone_entry on tableone( entry ); 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -