Home » SQL & PL/SQL » SQL & PL/SQL » Index Usage
Index Usage [message #248465] Fri, 29 June 2007 02:26 Go to next message
Messages: 51
Registered: January 2006

Step 1::
I have a table TAB1 having PK. AT the run time dynamically another table TAB2 is created with data.
Now if I join TAB1 and TAB2, TAB1 goes for FULL table access.

Step 2::
However if TAB2 is created without data and DATA (same as in Step 1) is INSERTED into the table then the query uses the PK of TAB1.

My problem is I want the index to be used in STEP 1 ALSO.
How it can be done?

THanks in Advance

[Updated on: Fri, 29 June 2007 02:26]

Report message to a moderator

Re: Index Usage [message #248474 is a reply to message #248465] Fri, 29 June 2007 02:47 Go to previous messageGo to next message
Michel Cadot
Messages: 65146
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Break your lines to max 80-100 characters when you format.
Please always post your Oracle version (4 decimals).

Create table on the fly is s...

How can you expect we answer you with so few information?

Re: Index Usage [message #248612 is a reply to message #248465] Fri, 29 June 2007 13:42 Go to previous message
Bill B
Messages: 1662
Registered: December 2004
Senior Member
A hint.

If the first table has an index, maybe the second table should also have one?

Also what is your query? If you have nothing in the where clause (for example), it is probably going to do a FTS.

[Updated on: Fri, 29 June 2007 13:43]

Report message to a moderator

Previous Topic: How to detect the special characters in string
Next Topic: How can I bifurcate result set into 2?
Goto Forum:

Current Time: Mon Aug 21 05:26:48 CDT 2017

Total time taken to generate the page: 0.09144 seconds