Home » RDBMS Server » Performance Tuning » Using Hint
Using Hint [message #135791] Fri, 02 September 2005 10:05 Go to next message
ynaiyer
Messages: 1
Registered: September 2005
Location: OHIO, USA
Junior Member

Could anyone help me to using the hint in a correct way to find the data faster

I am using the hint as

SELECT /*+ DISTINCT A.GLOBAL_SALES_REP_ID, B.PRIMARY_SALES_REP */
FROM SOES_CUSTOMER_ACCT A, CUSTOMER_ACCT B
WHERE A.PRIMARY_SALES_REP=B.PRIMARY_SALES_REP
A.GLOBAL_SALES_REP_ID='CP03'
Re: Using Hint [message #135802 is a reply to message #135791] Fri, 02 September 2005 11:09 Go to previous messageGo to next message
smartin
Messages: 1803
Registered: March 2005
Location: Jacksonville, Florida
Senior Member
Distinct is a sql keyword, and not (to my knowledge) a hint.

Also, distinct will make things run slower in exchange for producing unique results among the combination of columns in the select list.

For general advice on performance tuning, see the sticky.
Re: Using Hint [message #135807 is a reply to message #135791] Fri, 02 September 2005 11:27 Go to previous message
Art Metzer
Messages: 2480
Registered: December 2002
Senior Member
Hints should be used only as a last resort. Have you explored other avenues of tuning first? Is there an index? Is it being used? How long does this query take to run? What's the size of these two tables? What do your wait events indicate that your query is waiting for? Does this query involve a database link? What does tkprof indicate?
Previous Topic: Multiple Tablespaces
Next Topic: index ignored problem
Goto Forum:
  


Current Time: Thu Apr 25 17:13:13 CDT 2024