In some tests I did, autoincremented primary keys did not produce
sequential numbers. Of a 100 records inserted, I'd get anywhere between
102 and 110 as the highest index, but never the correct number...

cheers

Balthasar Indermuehle
Inside Systems GmbH
http://www.inside.net

"Louis Pasteur's theory of germs is ridiculous fiction." 
Pierre Pachet, Professor of Physiology at Toulouse, 1872 .  



-----Original Message-----
From: Ali Sadik Kumlali [mailto:[EMAIL PROTECTED] 
Sent: Monday, March 29, 2004 09:18
To: [EMAIL PROTECTED]
Subject: Re: [sqlite] Is using max(rowid) instead of count(*) safe?


Bert,

Thanks a lot for this unexpectedly quick response :)

Ali Sadik Kumlali

--- Bert Verhees <[EMAIL PROTECTED]> wrote:
> Ali Sadik Kumlali wrote:
> 
> >Hello,
> >
> >I am working with approximately 3.5 million rows data. As far as I 
> >see count(*) is very slow comparing with max(rowid).
> > 
> >I wonder if I could use max(rowid) safely instead of count(*). Does 
> >rowid increments by 1 for each new row?
> > 
> >Thanks a lot.
> >
> >Ali Sadik Kumlali
> >
> >__________________________________
> >Do you Yahoo!?
> >Yahoo! Finance Tax Center - File online. File on time. 
> >http://taxes.yahoo.com/filing.html
> >
>
>---------------------------------------------------------------------
> >To unsubscribe, e-mail: [EMAIL PROTECTED]
> >For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
> >  
> >
> When you delete a row in between the rowid's will not be decremented, 
> so it is only save when you never delete a row
> 
> Bert Verhees


__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to