On Fri, 2005-06-17 at 14:02 -0500, Sean Heber wrote: > I've been inserting data into a table with a non-integer primary > key. The data does not come in in an ordered fashion. My thought is > that perhaps performance suffers because it needs to rewrite huge > chunks of the data file in order to slot the new data into its > correct position within the file based on the sorting of the primary > key.
No. SQLite uses the B-Tree algorithm. Inserting a new value in the middle of a table involves rewriting 4 or 5 pages in the worst case. The usual case is to rewrite just the one page where the value is being inserted. -- D. Richard Hipp <[EMAIL PROTECTED]>

