Subject | Re: [ib-support] Delete first 100 from table |
---|---|
Author | Lester Caine |
Post date | 2003-06-11T07:38:38Z |
> Instead of deleting the records, how about recycling old records with anI can see where you are coming from, and if you were using
> Update. Only insert new records when there is no out-dated records
> available.
dBase or some other fixed record database it would be right.
However since records in Firebird are dynamically
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 ;).
That said - anybody - am I actually on the right lines? :)
--
Lester Caine
-----------------------------
L.S.Caine Electronic Services