user784637
user784637

Reputation: 16162

Does the amount of space an index on varchar(100) takes up depend on the length of the value stored?

Sorry if this question has been asked before.

I was thinking of putting an index on a field of VARCHAR(100). Does an index on 'foo' take up less space than an index on 'foobar123'?

Upvotes: 0

Views: 60

Answers (1)

Shamis Shukoor
Shamis Shukoor

Reputation: 2515

The space required will be more as the value is used for indexing.

But since it is compressed I dont think there would be a huge performance impact.

Upvotes: 1

Related Questions