dbTalk Databases Forums  

#hints>1?

comp.database.oracle comp.database.oracle


Discuss #hints>1? in the comp.database.oracle forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
bdj
 
Posts: n/a

Default #hints>1? - 07-21-2005 , 01:44 PM






Hello!
Can one give more than one hint in an select-statement?
Greetings
Bjørn



Reply With Quote
  #2  
Old   
Matthias Hoys
 
Posts: n/a

Default Re: #hints>1? - 07-21-2005 , 03:24 PM







"bdj" <B.D.Jensenremove (AT) gmx (DOT) net> wrote

Quote:
Hello!
Can one give more than one hint in an select-statement?
Greetings
Bjørn

Yes you can.
This is an example from the Oracle 10g docs :

Example 16-1 Specifying a Full Set of Hints

SELECT /*+ LEADING(e2 e1) USE_NL(e1) INDEX(e1 emp_emp_id_pk)
USE_MERGE(j) FULL(j) */
e1.first_name, e1.last_name, j.job_id, sum(e2.salary) total_sal
FROM employees e1, employees e2, job_history j
WHERE e1.employee_id = e2.manager_id
AND e1.employee_id = j.employee_id
AND e1.hire_date = j.start_date
GROUP BY e1.first_name, e1.last_name, j.job_id
ORDER BY total_sal;
HTHMatthias Hoys




Reply With Quote
  #3  
Old   
bdj
 
Posts: n/a

Default Re: #hints>1? - 07-21-2005 , 03:48 PM



Hi!
Can I also do it in Oracle 8i (yes, yes I know it's desupported - we are
preparing upgrade...)
/Bjørn

"Matthias Hoys" <idmwarpzone_NOSPAM_ (AT) yahoo (DOT) com> skrev i en meddelelse
news:42e00493$0$29031$ba620e4c (AT) news (DOT) skynet.be...
Quote:
"bdj" <B.D.Jensenremove (AT) gmx (DOT) net> wrote in message
news:42dfecef$0$7379$ba624c82 (AT) nntp02 (DOT) dk.telia.net...
Hello!
Can one give more than one hint in an select-statement?
Greetings
Bjørn


Yes you can.
This is an example from the Oracle 10g docs :

Example 16-1 Specifying a Full Set of Hints

SELECT /*+ LEADING(e2 e1) USE_NL(e1) INDEX(e1 emp_emp_id_pk)
USE_MERGE(j) FULL(j) */
e1.first_name, e1.last_name, j.job_id, sum(e2.salary) total_sal
FROM employees e1, employees e2, job_history j
WHERE e1.employee_id = e2.manager_id
AND e1.employee_id = j.employee_id
AND e1.hire_date = j.start_date
GROUP BY e1.first_name, e1.last_name, j.job_id
ORDER BY total_sal;
HTHMatthias Hoys




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.