Hi Oracle gurus,
I got the following query which is using the rank function and eating up my temporary tablespace and causing the query run very slow. DBS says its using lots of temp tablespace to sort the output.
This table got 30m rows.
Query:
select col1, col2
from (select a.col1, a.col2, a.col3,
rank() over(partition by a.col1, a.col2 order by a.col2 desc) "rank"
from a)
where rank = 1
Any suggessions? I trust that there will be a solution with you oracle gurus.
Regards
G
I got the following query which is using the rank function and eating up my temporary tablespace and causing the query run very slow. DBS says its using lots of temp tablespace to sort the output.
This table got 30m rows.
Query:
select col1, col2
from (select a.col1, a.col2, a.col3,
rank() over(partition by a.col1, a.col2 order by a.col2 desc) "rank"
from a)
where rank = 1
Any suggessions? I trust that there will be a solution with you oracle gurus.
Regards
G