We are currently migrating from a different type of database and I'm having a 
little trouble with performance. 

Our old selection method queries indexes and returns the equivalent of a list 
of rowids that we then use to access records as needed. I've managed to mimic 
this behavior but it is very slow. My select statement is something like 
"Select rowid from T01 where ref_uid=100". I then step through all rows, read 
in each rowid, assemble them into an array, and forward the array to a client 
which will then request the records by rowid one at a time.

This takes about 10x longer than our old selections. It appears to me that this 
is happening because each step to the next row is paging in data so the rowid 
can be read. I expected index trees would store rowids and make data reads 
unnecessary, but this doesn't seem to be the case.

Is there a way to speed this up, or a better approach? All I want is a list of 
all rowids that match my query.

Thanks
dw



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to