Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 Oracle Hints?

Author  Topic 

kumarpav
Starting Member

18 Posts

Posted - 2004-12-30 : 12:00:34
if i have 2 tables like Employee and Department.
i have Emp_pk1,Emp_pk2,Emp_pk3,Emp_pk4 indexes on Employee table
and
Dept_pk1,Dept_pk2,Dept_pk3 indexes on Department table.

How to put forcebly indexes on both Employee and Department tables using oracle hints?

For a single table we can put like this
"select /* INDEX_ASC(Employee Emp_pk2) */

For two tables how i can forcibly put indexes?

suppose i want to forcibly put index on
Emp_pk2 on Employee table and Dept_pk3 on Department table?

How i can ?

eyechart
Master Smack Fu Yak Hacker

3575 Posts

Posted - 2004-12-30 : 14:36:24
all your hints go in the comment block at the top start of your query.

go here for details on how Oracle uses optimizer hints and for examples showing multiple hints being used in a single query. http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96533/hintsref.htm

Also, dbforums.com is probabaly a better forum to ask oracle specific questions. SQLteam is geared mainly in supporting SQL Server. good luck.



-ec
Go to Top of Page

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2004-12-30 : 14:55:55
I'll give you an Oracle hint: It Sucks!

(just kidding .. sorry I thought that was funny .... happy new year, everyone, thanks for coming!)

- Jeff
Go to Top of Page
   

- Advertisement -