Brad Stiles wrote:
>  
>   
>>>     I wanted to know the algorithm used by sqlite to generate the new
>>> rowid. Assume there can be N distinct rowid's possible, now insert N
>>> records, followed by random deletion of some records. Now what rowid
>>> will be assigned to a new row that is added?
>>>       
>
>   
>> http://www.sqlite.org/autoinc.html
>>
>> Note that N=2^63-1. A typical application would have to work for a very 
>> long time to create N records.
>>     
>
> Not to mention the disk space it would consume, just for the keys:
>
> (2^63-1)*8 = 73786976294838206464 bytes
>
> / 1024 = 72057594037927936 kbytes
>
> / 1024 = 70368744177664 mbytes
>
> / 1024 = 68719476736 gbytes
>
> / 1024 = 67108864 tbytes
>   

/ 1024 = 65536 pbytes
/1024 = 64 ebytes


John
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to