Keith,

The final script produces corresponding results here, only a constant factor 
slower (minimal CPU). The rows per second is useful to summarize the tests for 
various keyset sizes. Below is the average per method with input parameter 5.

meth|rps|note
1|149431|Individual Row         
2|195447|Individual Row (Sorted)
3|167740|Rows ExecuteMany       
3|167740|Rows ExecuteMany Sorted 
4|146503|Using IN temp          
5|149261|Using IN temp (sorted) 
6|137831|Using IN keyset
7|136984|Using IN keyset sorted 
8|170922|Using IN (dynamic)
9|188759|Using IN (sorted)      
A|242761|Using IN CArray        
B|274883|Using IN CArray sorted 
C|308547|Using Array JOIN sorted

Hope this is useful to the original poster.

To me SQLite-Python is almost addicting. I learned to use carray now. It 
appears to interface brillantly with Python's array module. Only I have a 
custom carray instead of a custom execute method as you APSW (replaced 
sqlite3_bind_pointer by sqlite3_value_int64, for home use only).

Method C is a JOIN to carray, where the keys are sorted. Order by is not needed 
then.
       select x.* from carray(?,?,'int64') cross join x on id=value
             

Thanks, E. Pasma 
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to