On 17 Feb 2009, at 15:34, pyt...@bdurham.com wrote:

> Is there any advantage to having data pre-sorted (in index order)
> before loading it into SQLite and indexing it? Or does indexing
> work best if the index values are randomly ordered at data load
> time?

 From my own experience, there's a big performance gain both at the  
indexing stage and in queries that have to scan relatively large parts  
of the database in index order (at least if you're working with a  
database that doesn't fit in RAM).

Of course, if you're indexing multiple columns, you can only pre-sort  
data for one of them, so on average there will be little gain.




Best regards,
Stefan Evert

[ stefan.ev...@uos.de | http://purl.org/stefan.evert ]



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

Reply via email to