Re: explain plan [message #370212] |
Mon, 16 November 1998 12:41 |
Ryan Kogelheide
Messages: 2 Registered: September 1998
|
Junior Member |
|
|
Add a hint on the (cpy_id,odr_id) index for the receipt_lines table. So make the first query like:
Select /*+ INDEX(RL RL_PK) */ ....
where RL_PK is whatever your index name is on RL.
Or, if that fails, leave the from clause in the order you have it and add the hint:
Select /*+ ORDERED USE_NL(rct) INDEX(RL RL_PK) */
If you don't know anything about hints then read the following:
If you're using Oracle 7-7.3 and you have analyzed indexes or tables involved in the query then the cost based optimizer is in use and hints are needed in many applications. If you're a developer and don't know if tables have been analyzed, check the statistics on the tables in all_tables and all_indexes. If there are non-null statistics then the CBO is in use.
For more info on hints see the Server Application Developers Guide.
|
|
|