Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Determining table size with table conditions - response (1) by dnoeth

$
0
0
This approach should get you an approximate size without copying data: SELECT yr, currentperm * prct FROM ( SELECT SUM(currentperm) AS currentperm FROM DBC.TableSizeV WHERE DatabaseName = ... AND TableName = ... ) AS dt1, ( SELECT EXTRACT(YEAR FROM version_start_dt) AS yr, COUNT(*) AS cnt, CAST(cnt AS DEC(18,6)) / SUM(cnt) OVER () AS prct FROM ... GROUP BY 1 ) AS dt2 Dieter

Viewing all articles
Browse latest Browse all 27759

Trending Articles



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