Re: Packing on data table.



You can try reorganizing with LOB compaction.

--
Andrew J. Kelly SQL MVP
Solid Quality Mentors


"Iain Sharp" <iains@xxxxxxxxxxxx> wrote in message news:u73g05hdd22rf9h3322hepl57apo68k07o@xxxxxxxxxx

I have a table (structure to follow) which stores raw data (binary
images/pdf documents/OLE Objects).

sp_spaceused on the table (post deleting roughly 50% of the original
rows) shows :-
name : ine_repbatch
rows : 74724
reserved: 6209144 KB
data: 2119688 KB
index_size: 96 KB
unused: 4089360 KB


Question - Can I alter the way this is stored such that it does not
use 6Gb to store 2Gb of data? Should I care? Is the backup including
the 4Gb of space reserved but unused?

regards,

Iain

Structure :-
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[ine_repbatch](
[repb_id] [int] NOT NULL,
[u_version] [char](1) NULL,
[repb_doc_type] [char](20) NULL,
[repb_desc] [char](90) NULL,
[repb_usr_id] [int] NULL,
[repb_file] [char](240) NULL,
[repb_dt_cr] [datetime] NULL,
[repb_pdf] [image] NULL,
[repb_locked] [bit] NULL,
[repb_destination] [char](5) NULL,
CONSTRAINT [ine_repbatch_pk] PRIMARY KEY CLUSTERED
(
[repb_id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY
= OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 90)
ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET ANSI_PADDING OFF


.



Relevant Pages