Re: [sqlite] read and update record at the same time

2005-08-23 Thread D. Richard Hipp
On Tue, 2005-08-23 at 21:46 +0200, tone skoda wrote:
> read (SELECT) has to find physical position of record on disk.
> update too has to find physical position of record on disk.
> this is inefficient if it's done twice in a row, because two searches for 
> record have to be performed. 
> only one search would be enough and more efficient.
> is there any way SELECT and UPDATE can be done in in one SQL statement?
> 
> in fact, why isn't it possible to refer to records by their physicall offset 
> on 
> disk? as far as i know thay don't change.
> 

SQLite supports variable-length records with automatic
compaction and defragmentation.  Records are subject to
being moved about on the disk after any change to nearby
records.
-- 
D. Richard Hipp <[EMAIL PROTECTED]>



[sqlite] read and update record at the same time

2005-08-23 Thread tone skoda
read (SELECT) has to find physical position of record on disk.
update too has to find physical position of record on disk.
this is inefficient if it's done twice in a row, because two searches for 
record have to be performed. 
only one search would be enough and more efficient.
is there any way SELECT and UPDATE can be done in in one SQL statement?

in fact, why isn't it possible to refer to records by their physicall offset on 
disk? as far as i know thay don't change.




http://www.email.si/