"Brandon, Nicholas \(UK\)" <[EMAIL PROTECTED]> wrote:
> 
> I've noticed this question [making count(*) faster] has been raised 
> a few times in the past and the workaround proposed is to create a
> "count" table to eliminate the need to do a table scan. I was 
> wondering whether it is worth adding this feature to Sqlite so that
> a call to "select count(*)... " (which is not restricted with a
> WHERE clause) is retrieved from an internal "count" table? i.e.
> this performance workaround is part of the core sqlite code.
> 

I considered but rejected that idea when originally designing
the SQLite file format.  Keeping a count involves extra I/O 
which slows down every INSERT or DELETE operation.  I did not
want users who do not use count(*) to have to pay that penalty.
--
D. Richard Hipp  <[EMAIL PROTECTED]>


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to