Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Packing seems to exist
Message
De
29/01/2013 04:47:50
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Indexation
Titre:
Packing seems to exist
Versions des environnements
SQL Server:
SQL Server 2008
Divers
Thread ID:
01564445
Message ID:
01564445
Vues:
59
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?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform