Hi,
I have 2 tables in SQL SERVER
* TbUrl
INDEX SPACE 12,531 MB
ROW COUNT 247505
DATA SPACE 1.965,891 MB
CREATE TABLE [TbUrl](
[IdUrl] [Int] IDENTITY(1,1) NOT NULL,
[IdSupply] [Int] NOT NULL,
[Url] [varchar](512) NOT NULL,
[UrlCod] [varchar](256) NOT NULL,
[Status] [Int] NOT NULL,
[InsertionDate] [datetime] NOT NULL,
[UpdatedDate] [datetime] NULL,
[UpdatedIp] [varchar](15) NULL
* TbUrlDetail
INDEX SPACE 29,406 MB
ROW COUNT 234209
DATA SPACE 386,047 MB
CREATE TABLE .[TbUrlDetail](
[IdUrlDetail] [Int] IDENTITY(1,1) NOT NULL,
[IdUrl] [Int] NOT NULL,
[Title] [varchar](512) NOT NULL,
[Sku] [varchar](32) NOT NULL,
[MetaKeywords] [varchar](512) NOT NULL,
[MetaDescription] [varchar](512) NOT NULL,
[Price] [money] NOT NULL,
[Description] [text] NOT NULL,
[Stock] [Bit] NOT NULL,
[StarNumber] [Int] NOT NULL,
[ReviewNumber] [Int] NOT NULL,
[Category] [varchar](256) NOT NULL,
[UrlShort] [varchar](32) NULL,
[ReleaseDate] [datetime] NOT NULL,
[InsertionDate] [datetime] NOT NULL
The size of TbUrl is very large compared with TbUrlDetail
The layout (design) of table TbUrl is less compared with TbUrlDetail but the dataspace it´s else.
I´ve done SHRINK ON DATABASE but the space of TbUrl don´t reduce.
What might be happening? How do I decrease the space of this table?
Software/Hardware used:
SQL SERVER 2008 R2 EXPRESS
ASKED:
May 3, 2012 2:21 PM
UPDATED:
May 5, 2012 6:01 AM
What will be if you change VARCHAR to CHAR data type?
DATA SPACE 1.965,891 MB
That makes me think that your region uses the comma as the ‘decimal point’ and the period as the ‘separator’. That would indicate that the full size of the data space is just under 2GB.
And that would indicate an average row in the TbUrl table accounts for around 8000 bytes.
Am I reading your numbers correctly?
How volatile is the table? That is, how many rows are inserted and deleted on what frequency?
Tom