Subject RE: [firebird-support] Sudden increase in execution times
Author Dunbar, Norman
Morning Pepak,

>> Ann W. Harrison napsal(a):
>> > Ah. That's almost the same cost as a deletion - the old
>> version of the
>> > history record has to be garbage collected. If there's an
>> index on the
>> > deleted field in history, the index entry must also be
>> removed. Since
>> > there are likely to be LOTS of entries in that index with the same
>> > the index deletion will be expensive ... less so in 2.0x than 1.5x.
>> >
>> I am sure that is so in the general case, but it's unlikely to apply
>> here - the query I am trying to solve doesn't do any
>> deletions and there
>> are very few, if any, deletes on any of the two tables concerned.

I think what Ann is telling you is that updating the deleted flag in a
record has almost the same cost as physically deleting the record. Your
update statement will cause a new version of the record to be created
and the old one (or some indicator of it) will require garbage
collection at some point in the future.

It is the garbage collection that is thought to be causing your slow
downs - even if your query at the time of slowdown, is a SELECT.

Cheers,
Norman.

Norman Dunbar
Dunbar IT Consultants Ltd
Orchard House
10a Greenacre Park Mews
Rawdon
Leeds
LS19 6RT

Tel: 0779 3292 984
Tel: 0773 4531 439


Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else. We have checked this email and its attachments for viruses. But you should still check any attachment before opening it. We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes. If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk

Information in this message may be confidential and may be legally privileged. If you have received this message by mistake, please notify the sender immediately, delete it and do not copy it to anyone else.

We have checked this email and its attachments for viruses. But you should still check any attachment before opening it.
We may have to make this message and any reply to it public if asked to under the Freedom of Information Act, Data Protection Act or for litigation. Email messages and attachments sent to or from any Environment Agency address may also be accessed by someone other than the sender or recipient, for business purposes.

If we have sent you information and you wish to use it please read our terms and conditions which you can get by calling us on 08708 506 506. Find out more about the Environment Agency at www.environment-agency.gov.uk