Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Delphi TTable-component
Hi,
a PK is an index. When you perform a query with a where-clause on your PK it should be fast because the oracle optimizer chooses the right index.
I am not quite experienced in delphi but i think the indexfieldnames property is only usable for dbase/paradox tables and their indexes.
just let the oracle optimizer do his job an let him choose the right index. when you want to override this just read the chapter about optimizer hints in your oracle documentation
N. Wiesemann
>Dear Oracle admirers,
>
>I'm facing a strange problem :
>
>I'm an expirienced Delphi programmer but an Oracle newbie !
>I have a large table with 200,000 records. I do have a primary key on the
>field 'ID',
>
>When I use a TTable-component and set IndexfieldNmaes to that 'ID', it takes
>a very, very long time to find the record with ID equal to 150,000.
>When I don't put anything into the property IndexFieldNames it only takes a
>part of a second to find the same record.
>
>Two questions :
>- I do use the correct index : why does it take so long when I really
>specify the key ?
>- In general : I'm using Delphi 4. Should I use TTable or TQuery ? Any white
>papers on this subject ?
>
>Thanks for your reply.
>
>H.
>
>
>
Received on Mon May 03 1999 - 15:25:40 CDT
![]() |
![]() |