Quantcast
Channel: Comments and answers for "Indexing VarChar vs BigInt"
Viewing all articles
Browse latest Browse all 4

Answer by Rob Farley

$
0
0

Is it going to be beneficial for me to change this 78 million row structure to hold BIGINT instead of VARCHAR

I wouldn't bother. Instead, I'd be looking at having a much smaller set of keys for your Clustered Index. Remember that every non-clustered index must include the CIX key for every row, bloating your database significantly for very little gain.

Consider having a unique non-clustered index on those columns, but use a surrogate key of int (or bigint if you might need more than 2 billion rows one day) for your CIX.

Also... a 72-byte key will take a lot more non-leaf pages, increasing the cost of almost all your queries.


Viewing all articles
Browse latest Browse all 4

Trending Articles