Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forcing an INDEX to be used in a LEFT JOIN

Status
Not open for further replies.

LeonelSanchezJr

Programmer
Jan 26, 2001
522
US
I have a query which is NOT using any INDEX in one of my LEFT JOINs despite the fact that both tables have the field INDEXed.

Is there some type of Syntax that would force it to use an INDEX?

This is my JOIN syntax:

LEFT JOIN TABLE_A
ON TABLE_B.NUMBER_ID = TABLE_A.DOC_ID

Thanks,

Leo ;-)
 

You could try using an "index" hint [ponder]

----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
PS: Optimizer to use existing indexes requires tables/indexes to be ANALYZEd. [3eyes]


----------------------------------------------------------------------------
The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top