简体   繁体   中英

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM