Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Speed of PrimaryKey vs Index
On 03-Mär-99 21:11:19 Stan wrote:
>I am using Oracle with Delphi (using a TTable and TDBGrid - this is not
>necessary to know). I am using a grid component to display my data.
>When the data is sorted on the primary key, it navigates very quickly.
>However, if I switch the sort order to the Index key, it moves very
>slowly.
This seems not to be Oracle's fault. As far as I know do TTable components
first investigate the Oracle table in order to find out wehich indexes are
there and what the indexed columns are.
When you open the TTable, it generates the SQL sent to Oracle. Maybe it
generates some strange SQLs that perform badly.
You should try setting sql_trace=true in order to find out the exact SQL
that is sent to Oracle. If you have Delphi C/S you also can use SQLMonitor
to find out.
Then you could do explain plan to find out the execution plan for these
SQLs. To have better performance, you should optimize these SQLs and use
them in TQuery components. These ones normally perform much better than
tables when used with an Oracle database.
>Stan.
Hope that helps,
Lothar
--
Lothar Armbrüster | lothar.armbruester_at_rheingau.netsurf.de Schulstr. 12 | lothar.armbruester_at_t-online.de D-65375 Oestrich-Winkel |Received on Thu Mar 04 1999 - 13:26:39 CST