Thanks Igor.
I really want O(1), but selecting by elo DESC and then setting a ranking
column for all records seems to be very slow, even during a
transaction. Any tips for doing that fast?
Thanks,
Ian
On 09/09/2011 13:34, Igor Tandetnik wrote:
Ian Hardingham<i...@omroth.com> wrote:
Hey Igor, thanks for the reply.
Is this O(1)? Or... I guess it's probably low-magnitude O(log n) ?
It's O(n). There's no shortcut to count(*), it walks through and counts all the
records satisfying the condition. A B-tree doesn't provide a fast way to obtain
a number of all the elements smaller than a given element.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users