cancel
Showing results for 
Search instead for 
Did you mean: 

use_hash in derived table

Former Member
0 Kudos

Is it possible to use use_hash in the derived table?

I get a warning "Each calculated column must have an explicit name" if I include

select /*+ use_hash(table_names) */.It parses ok if I remove this line.Basically query runs for a long time without use_hash.

Can somebody help me with this?

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

As it says, each column must have a unique name.

This is so that you can select it when building objects and predefined conditions.

Please can you post the SQL that you want to use?

Former Member
0 Kudos

Hi Me map,

Thanks for your reply.

The parsing is ok if I remove the first line after select "/*+ use_hash(Table1 Table2) */".

My query is as follows:

select /*+ use_hash(Table) */

cus.name

-


-


etc.

However when I edit the sql at the report level the query is running.

Former Member
0 Kudos

What RDBMS are you working with? E.g. Oracle, SQL Server, etc.?

What sort of performance time comparisons are you getting with and without the hash optimiser?

Former Member
0 Kudos

I use oracle database.

When I run the report without the use_hash it is taking more than 3 hours and when hash is applied it returns within 25 seconds.

When I run the query against the database I observed the similar performance.