Subject | Re: [ib-support] Slow Posting |
---|---|
Author | Pete Clark |
Post date | 2003-01-14T15:26:32Z |
In message <022c01c2bbbe$c27b0e20$0a02a8c0@seal>, Martijn Tonies
<m.tonies@...> writes
delay. It's an UPDATE rather than an INSERT.
the WHERE. I certainly haven't done so.
Pete Clark
<m.tonies@...> writes
>Hi Pete,Yes, Delphi TIBQuery.post. I stepped through the code until I found the
>
>> My post commands are very slow.
>
>Do you mean <somedelphicomponent>.Post or do you mean an
>actual INSERT INTO statement?
delay. It's an UPDATE rather than an INSERT.
>> I am selecting records "where status=1", dealing with them, thenYes, an autoinc, not directly relevant to this SELECT.
>> changing Status to 2. Status is not an indexed field. The SELECT
>
>Does the table have a primary key?
>> command is more complex, there are other "wheres", but no other fieldsI was wondering if the SELECT might create it's own index, because of
>> are being changed.
>>
>> Since status has low selectivity - there are about 6 choices, over about
>> 5 million records - then I can guess why there might be a problem
>> (index? record moving out of "where" condition?). But I have no idea
>> what to do about it...
>
>You shouldn't index that field - it's no use.
the WHERE. I certainly haven't done so.
>--
>
>With regards,
>
>Martijn Tonies
Pete Clark