On Fri, Nov 12, 2010 at 1:06 PM, David Levinson <dlevin...@worldnow.com>wrote:

>  I have an 11GB database and when I attempt to query the database for the
> max(column) value the code within sqlite3_step() gets stuck in a loop for
> hours and hours and never seems to return.
> Do you know why this is the case and how it can be resolved? I stepped into
> the code and all I see page allocations getting created over and over and
> over. I just updated to the latest sqlite3 updates and the issue continues.
> My sense is that this is something related to 64 bit indexes. Could this
> be?

If column is not indexed, then SQLite has to loop through all 11GB of your
database file looking for the maximum value.  That can take time (though
measured in 10s of seconds, not hours).

What does it say if you prepend EXPLAIN QUERY PLAN to the beginning of your

D. Richard Hipp
sqlite-users mailing list

Reply via email to