Subject | Re: [firebird-support] Re: Slow search on a primary key index |
---|---|
Author | Robin Davis |
Post date | 2006-05-08T09:56:01Z |
Hi,
Adam wrote:
search fucntion in Access I suppose. Strange, if I FILTER for the
record, the result is as quick as iSQL. A way round the problem I
suppose, but not ideal.
computed field that was equal to the primary key, but then Firebird
wouldn't let me create an index on it.
Thanks for getting back,
Rob Davis
Adam wrote:
>> I have a table of invoices where the primary key is also the invoiceNope, no second index.
>> number. I use Access 2003 as the front-end and would like to be able to
>> search my Firebird 2.0 database by invoice number quickly when asked to
>> - usually by people questioning their bill! ;-) However, even with a
>> tiny number like 7000 records to search, it can take over 8 seconds to
>> find the invoice required. Is there any way I can speed up the searches
>> so that they are virtually instantaneous, as they are with other
>> non-primary key indexed fields?
>> Well it doesn't seem stupid but it is definately unusual.
>>
>> Please tell me you did not explicitly define an index on Invoice
>> Number.
>> Run yourI did that, and the result came back instantly. Ergo, a problem with the
>> query from iSQL. If you don't get the same issue, then your problem
>> isn't with Firebird.
>>
search fucntion in Access I suppose. Strange, if I FILTER for the
record, the result is as quick as iSQL. A way round the problem I
suppose, but not ideal.
>> Secondly, it is usually a bad practice to use a field that has realThanks for the advice, I will try and sort that out. I tried to create a
>> world significance as your primary key.
computed field that was equal to the primary key, but then Firebird
wouldn't let me create an index on it.
Thanks for getting back,
Rob Davis