Re: [sqlite] Re: Check for empty table

2006-12-13 Thread Nicolas Williams
On Wed, Dec 13, 2006 at 01:33:35PM -0500, Igor Tandetnik wrote:
> Nicolas Williams <[EMAIL PROTECTED]> wrote:
> >On Wed, Dec 13, 2006 at 06:07:56PM +, RB Smissaert wrote:
> >count(*) doesn't read every record in the table.
> 
> Does too. Run EXPLAIN and see for yourself.

Ah.  Yes.  It could optimize "select count(*) > 0 from sometable;" as
"select 1 from sometable limit 1;"...

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



[sqlite] Re: Check for empty table

2006-12-13 Thread Igor Tandetnik

Nicolas Williams <[EMAIL PROTECTED]> wrote:

On Wed, Dec 13, 2006 at 06:07:56PM +, RB Smissaert wrote:
count(*) doesn't read every record in the table.


Does too. Run EXPLAIN and see for yourself.

Igor Tandetnik

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