Subject Re: [firebird-support] Slow updates
Author Alexandre Benson Smith
Christian Kaufmann wrote:

>I have the following problem:
>
>Table with 1.5 million records, growing constantly.
>
>One field that contains the integer 0 in 99% of the records and
>different values for all other records.
>
>Sometimes I need to update this field with something like
>
>update MYTABLE set F = newvalue where F = oldvalue
>
>
>If I don't have an index, update is very slow. But having an index on
>a field where a lot of records are the same, slows down the insert of
>new records.
>
>What is the best solution for this problem?
>
>cu Christian
>
>
>
Hi Christian,

Create a compound index on that field and the table primary key.

see you !

--

Alexandre Benson Smith
Development
THOR Software e Comercial Ltda.
Santo Andre - Sao Paulo - Brazil
www.thorsoftware.com.br



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.4 - Release Date: 18/03/2005