On Thu, Aug 19, 2010 at 1:30 PM, Eric Smith <eas....@gmail.com> wrote: > Afaict sqlite doesn't support indices on subsets of rows in a table, Ю > la http://en.wikipedia.org/wiki/Partial_index -- right? > > Any plans to implement that?
+1 for this feature request. They've got a very specific and fairly rare use case, but when opportunity strikes partial indexes are much more convenient, straightforward, and efficient than the alternative. - If a table has 100,000,000 rows and each index page for it holds 100 rows, a full index will need 1,000,000 pages of storage and 4 page reads to search. - With a partial index covering only 10,000 rows of the same table, it will only need 100 pages of storage and 2 page reads to search. Big improvement while keeping query syntax and results exactly the same! > Are there any known hacks to implement something similar? There's not really any good solution. You can create a separate table with the subset in it, that's pretty much it. But that has some overhead too, and can complicate your queries. -- Cory Nelson http://int64.org _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users