I have a table with 320 million+ rows and 34 columns, all of varchar(max)
datatype, and with no indexing.
I am finding it extremely time consuming to summarize the whole table. Can anyone suggest best way to optimize this considering the following purpose I need to use it:
Should I go for creating a non-clustered index on sequential row number column that I have added?
My table size on disk is 185 GB approx.
I am using
Since data has no unique column so I have already added a sequenced with integer and it took 2 days to complete the operation.
nvarchar(max)
is the most common type, so it can not be optimized. Use int
or bigint
for numbers, use nvarchar(N)
where N - max length. Use bit
for boolean, and so on