Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Packing seems to exist
Message
From
30/01/2013 05:44:38
Thomas Ganss (Online)
Main Trend
Frankfurt, Germany
 
 
To
29/01/2013 04:47:50
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Microsoft SQL Server
Category:
Indexing
Environment versions
SQL Server:
SQL Server 2008
Miscellaneous
Thread ID:
01564445
Message ID:
01564644
Views:
43
>I had to do one of those operations which can't be done without re-creating the table. So I did something like this (in meta code):
>
>
rename mytable to mytable_001
>create table mytable (... ....)
>insert into mytable (fieldlist) select ... from mytable_001
>
>So far so good. Then, just to check, went into properties of the new table and the renamed old table. Row count was the same; the space taken by the data was shrunk a bit, not much. But the space taken by the index went from 4,289 M to 0,008 M. Which means that there's some serious fragmentation of index blocks occurring during the regular inserts (mind you, this was the audit table, no updates ever). Tried with another table and there it was, the size of index shrank drastically.
>
>I assume the shrunk index would speed up the operation, at least because of the smaller memory usage. Perhaps rebuilding a table may not be practical, but would dropping and creating the indexes, on the most heavily used tables, gain me some speed?

scrap that, replier read error...
Previous
Reply
Map
View

Click here to load this message in the networking platform