'Getting the "size" of a view in Redshift
Essentially, I'm trying to figure out the size table foo
will be after executing:
CREATE TABLE foo AS (
SELECT * FROM my_view
);
My gut tells me that the easiest approach would be to SELECT count(1) FROM my_view
and multiply by the column widths, but that won't help me with VARCHARs.
Is there a "right" way to do this?
Solution 1:[1]
I also think that size might be based on the type of view. A normal view should not have size on disk since it's merely pulls the results from an underlying table. But if its a materialized view, then it would have size on disk
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Deji Kadri |