Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Issue with Rank/row_number in table - response (1) by dnoeth

$
0
0

Each RANK will be a seperate step in explain and each step will spool all the rows twice.
 
What datatypes are the PARTITION/ORDER BY columns? VARCHARs are expanded to CHARs in that case, this might result in high spool usage.
 
Depending on the size of the "other columns" a solution might split the query in two Derived Tables, the data needed for RANKing and the "other columns" and then join them back.
 
Dieter


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>