Home » RDBMS Server » Server Administration » query tuning
query tuning [message #61386] Tue, 20 April 2004 07:08
sidd
Messages: 130
Registered: May 2003
Senior Member
I have a query as below:

/* tab1 has 2 million recds and tab2 has 10k recds they both have indexes on their id columns . When I do the below query it uses only tab2_indx_id only which runs 4 mints, so I droped that Index since it’s a smaller table than tab1 to see if its uses tab1_indx_id, but it did not use it even after recreating the index on tab1*/

query:

Select a.name, b.ud

From

tab1 a, tab2 b

where a.id = b.id (+)

/

/* When I take that outer join (+) from the query it uses the Index on both the tables. I don’t know why */

query:

Select a.name, b.ud

From

tab1 a, tab2 b

where a.id = b.id

/

I don’t know why its using index when I take the outer join (+) from the query. anyway I want the query to use the index when i do outer join (+)

Thanks.
Previous Topic: Oracle Export Hangs
Next Topic: SUBSTR HELP.
Goto Forum:
  


Current Time: Fri Sep 27 12:21:28 CDT 2024