0

Updatable Clustered Column Store Index (SQL Server 2016+) - does it have max row size (8060) limitation, or you can put any row size you want in there ?

In other words, is it possible to get below error with updatable CCI ?

Cannot create a row of size 8061 which is greater than the allowable maximum row size of 8060.

3

LMWTDFY

Yes.

CREATE TABLE dbo.tc
(
    c1 char(4030),
    c2 char(4023)
);

INSERT INTO dbo.tc VALUES ('A', 'A');

CREATE CLUSTERED COLUMNSTORE INDEX c ON dbo.tc;

Results in:

Msg 1975, Level 16, State 1, Line 6 Index 'c' row length exceeds the maximum permissible length of '8060' bytes.

2
  • in this example, if I change the data type of columns c1 and c2 from char to varchar(5000), and then insert 'A' replicated 5000 times, into both columns and then create columnstore clustered index, it succeeds (no errors). Wonder why ? Didn't I just insert 10,000+ byte row in there ? Oct 7 '21 at 11:50
  • 1
    @AlekseyVitsko Answers are all around you Oct 7 '21 at 12:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.