Subject | Re: [ib-support] Delete first 100 from table |
---|---|
Author | Albert L. |
Post date | 2003-06-11T08:04:43Z |
Lester Caine wrote:
>>Instead of deleting the records, how about recycling old records with anRight ! That was some old hot technique :)
>>Update. Only insert new records when there is no out-dated records
>>available.
>
>
> I can see where you are coming from, and if you were using
> dBase or some other fixed record database it would be right.
> However since records in Firebird are dynamically..that (technique) is outdated now :)
> positioned, and creating a new record by updating an old one
> would mean that the old data is copied to a new record, and
> then the data changed, and the changes 'transactioned', it
> has to be faster to delete the 'old' record and then just
> create a new one - no copying information in the engine.
>
> It's one of those problems where understanding exactly how
> the engine works would be nice, but it's not necessary if
> you just remember that any update COPIES the existing record
> to a 'new' one, makes the change, and then decides which
> copy to keep. Delete will mark a 'space' as available, so
> that 'insert' can use it directly without the extra copying
> - ignoring garbage collection ;).
>Albert.
> That said - anybody - am I actually on the right lines? :)