-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 06/15/2010 09:33 PM, Jay A. Kreibich wrote: > Contiguous, yes, but the pages may not be in any logical order. > The internal node pages will get shuffled as the tree is built, > meaning you might still have a significant number of seeks.
Seeks nearer to other pages will be quicker (for spinning media) and most operating systems do a fair amount of read ahead. For example if SQLite asks for a particular page the OS may read the next 256kb too. If that additional data was only index pages then chances are far more likely for cache hits. About the only scenario where having the index pages and data pages interleaved is beneficial is a query that needs some columns from the index and some (unindexed) from the data and most of the rows are relevant to the query. The data pages and index pages will be closer then, but even this scenario would require very carefully contriving your data and indices. The advice still stands - create the indices after, not before. Roger -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkwYaFUACgkQmOOfHg372QQ3lQCfdHcDOrgftEepPICEhzXuSTqk qa0AoJBiPbcitaqwZYQulr/1bAvls5+B =qs6R -----END PGP SIGNATURE----- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users