Max Row Size

Moderator: NorbertKrupa

Post Reply
User avatar
Josh
Intermediate
Intermediate
Posts: 106
Joined: Thu Jan 26, 2012 9:38 pm

Max Row Size

Post by Josh » Fri Jul 13, 2012 2:44 pm

According to the "SQL Reference Manual" on page 17 the maximum row size is listed as 8MB...
8MB. The row size is approximately the sum of its maximum column sizes, where, for example a varchar(80) has a maximum size of 80 bytes.
Is this true?

If I have a table of 1600 VARCHAR(65000) columns wouldn't the maximum row size be 99.18 MB?

8 MB is huge limitation, isn't it?
Thank you!
Joshua

User avatar
JimKnicely
Site Admin
Site Admin
Posts: 1825
Joined: Sat Jan 21, 2012 4:58 am
Contact:

Re: Max Row Size

Post by JimKnicely » Mon Jul 16, 2012 1:31 pm

Josh,

8 MB equals about 129 VARCHAR(65000) columns! How many tables in your database will have this structure and size :)

As shown below I can only create a table with 129 VARCHAR(65000) columns and one more column as a VARCHAR(2560).

Code: Select all

create table large_table (
dbadmin=> create table large_table (
dbadmin(>  col1 varchar(65000),
dbadmin(>  col2 varchar(65000),
dbadmin(>  col3 varchar(65000),
dbadmin(>  col4 varchar(65000),
dbadmin(>  col5 varchar(65000),
 ...
dbadmin(>  col127 varchar(65000),
dbadmin(>  col128 varchar(65000),
dbadmin(>  col129 varchar(65000),
dbadmin(>  col130 varchar(2560));
CREATE TABLE
If I try to create the column col130 as a VARCHAR(2561), I get an error:
  • ERROR 4630: Row size exceeds MaxRowSize: 8388609 > 8388608
Jim Knicely

Image

Note: I work for Vertica. My views, opinions, and thoughts expressed here do not represent those of my employer.

Post Reply

Return to “New to Vertica”