-
amount of data in a column
I have a partitioned table, which contains 2 varchar2(4000) columns. I have
a hunch that this is way over-sized.. Is there a query I can use that can
tell me the number of bytes in this column for each partition.
If this is not possible is there a MIN/MAX query I can use on this column for
each partition to provide the smallest amount of data in the column for all
the partitions and the largest amount of data in the column for all the
paritions.
Thanks in advance to all who answer
-
Well, the good news with varchar2 is that it does not take up 4000 bytes. Your column can hold up to 4000 bytes, but it will use only what the length of the data/record is. Unlike char, the length used for char in the DDL will take up that length regardless of how much or how little is used.
select max(length(your_coulmn)) to see how big the largest tuple is.
You can also drill down in the stats for the table column to see data distribution, but if you need the exact max length (not what was sampled via estimate, or if not indexed), then use max.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|