AfricaDotNet
www.AfricaDotNet.com Continues the .NET Conversation in Africa

Oracle Query optimization using the hint

rated by 0 users
Not Answered This post has 0 verified answers | 2 Replies | 2 Followers

Top 10 Contributor
Male
22 Posts
Ben Chege posted on 09-18-2009 2:11 AM

A few months ago when I was working with Oracle in a data warehouse, I came across hints. Basically these are statements in the below form

/*+ hint */

/*+ hint(argument) */

/*+ hint(argument-1 argument-2) */


placed inside your query to manipulate the oracle optimizer to optimize a query's execution plan. e.g.

select /*+ FULL(emp) PARALLEL(emp, 35) */  emp_name from emp;

which basically says to the optimizer to do a full scan of the specified table using FULL(emp) hint and that the operation is to be done in parallel using  the PARALLEL(table, instances).
in multi-processor environments this is helpful if the table has not been altered with a certain degree of parallelism we can query a large table quite fast and since they appear as comments they are ignored by an environment that does not have multiprocessing.
Does anyone know how to do this in sql server?

 

All Replies

Top 10 Contributor
40 Posts

SQL Server, or at least SQL 2008 does have that functionality. Read this http://technet.microsoft.com/en-us/library/ms187373.aspx for more information

Top 10 Contributor
Male
22 Posts

seen it, thanx

Page 1 of 1 (3 items) | RSS
(c) AfricaDotNet
Powered by Community Server (Non-Commercial Edition), by Telligent Systems