On 23 Jul 2009, at 2:20am, Jim Showalter wrote:
> The query looks like this:
>
> select distinct * from tbl where a <> 0 order by a desc, b desc, c
> desc, d desc limit 2;
>
> where a, b, c, and d are all type INTEGER.
To add to Igor's point, how much use an index is varies depending on
how
Jim Showalter wrote:
> What is the overhead in O notation for adding an index to a column in
> SQLite?
You mean size overhead? O(n): the index is basically just another table
(usually with fewer columns than the original). There's one record in
the index for every record
I have everything working now, and am just tidying up. I want to add
indexes, if needed, but this is for a cellphone app, and I'm worried
about using up space, particularly when the data is unlikely to be
more than a couple thousand rows in total. But there is a query that
might be slow
3 matches
Mail list logo