Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Table Size - 2 tables with same data 2 diff sizes!

Status
Not open for further replies.

Sweenster

MIS
Sep 9, 2005
58
GB
Hey,

Using SQL 2008 I have created a copy of a table but with a different set of indexes on and then inserted all data from the original into the copy. Doing a right click on the tables and selecting Propeties, Storage shows that both tables have the same number of rows (a touch over 20 million) but the new table takes up just 47gb in space with the old one taking 60gb. [This is just data space not index]

I am curious to know how can this be? I am assuming its to do with the new clustered index organising things better??

Cheers
Mark

PS I am not keeping both tables but wanted to test side by side to prove new is faster to query. It is and one query saw a drop from 4.5 mins to 22 seconds! Yeah..[Good]Indexes rule!!
 
off the top of my head I would say:
fill factor
padding
fragmentation

but there could be other reasons as well...

--------------------
Procrastinate Now!
 
I agree.

Denny
MVP
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / SQL 2005 BI / SQL 2008 DBA / SQL 2008 DBD / SQL 2008 BI / MWSS 3.0: Configuration / MOSS 2007: Configuration)
MCITP (SQL 2005 DBA / SQL 2008 DBA / SQL 2005 DBD / SQL 2008 DBD / SQL 2005 BI / SQL 2008 BI)

My Blog
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top