Wednesday, March 28, 2012

Index size

Hi!
If I have an index on a nvarchar-column and change this column to varchar,
will the index size decrease? and the db-size too?
Thanks
//MalinNumber of data pages will probably decrease. So will number of pages used by the index. This will
mean that number of pages used in the database will decrease.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Malin Davidsson" <malin.davidsson(at)aus.teleca.se> wrote in message
news:ejc4dEZ0GHA.3656@.TK2MSFTNGP04.phx.gbl...
> Hi!
> If I have an index on a nvarchar-column and change this column to varchar, will the index size
> decrease? and the db-size too?
> Thanks
> //Malin
>|||Hi,
Add on to Tibor; I just verfied te scenario with an example. As Tibor
mentioned while converting from NVarchar to Varchar
data type the Index size decreased.
Thanks
Hari
SQL Server MVP
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:eTN$BLa0GHA.3464@.TK2MSFTNGP03.phx.gbl...
> Number of data pages will probably decrease. So will number of pages used
> by the index. This will mean that number of pages used in the database
> will decrease.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "Malin Davidsson" <malin.davidsson(at)aus.teleca.se> wrote in message
> news:ejc4dEZ0GHA.3656@.TK2MSFTNGP04.phx.gbl...
>> Hi!
>> If I have an index on a nvarchar-column and change this column to
>> varchar, will the index size decrease? and the db-size too?
>> Thanks
>> //Malin
>sql

No comments:

Post a Comment