General information
Forum:
Microsoft SQL Server
Category:
Database management
Title:
Bloated table: how to fix
I'm importing 13,000 records into a table and my SQL Server 2005 database bloats to 2.2 gigs. After doing a database shrink, the database itself drops a few percent in size and the log file drops to almost nothing.
When I run EXEC sp_msforeachtable 'EXEC sp_spaceused ''?''' I get the following output
NAME rows reserved data indexsize unused
device 13520 2207448 KB 2198992 KB 6808 KB 1648 KB
this shows me that it is my device table that is taking up almost all of the space. 2.2 gigs is way too big for the 13000 records.
Is there a way to determine what is causing the table to bloat?
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only