Monday, March 19, 2012

Indexing Huge Table

Well i have a database on my production server which is containing a table
having 10 million records and daily 10 - 20 K records are being inserted into
the same. The Table is also containing 25 indexes on different columns so
which is best time and way to reindex my table for newly inserted records.
Please helpAmit Patel wrote:
> Well i have a database on my production server which is containing a
> table having 10 million records and daily 10 - 20 K records are being
> inserted into the same. The Table is also containing 25 indexes on
> different columns so which is best time and way to reindex my table
> for newly inserted records.
> Please help
You don't need to reindex for new rows. They are automatically added to
indexes on the table when the row is added/updated/deleted.
I'm guessing this table is used in a DSS scenario and that's the reason
for all the indexing. Without knowing more about your environment and
how the table is used, it's hard to recommend options other than to say
you may want the clustered index on the table to be on a key(s) that
won't cause too much page splitting. But, then again, for DSS it may be
better to have the clustered index on a set of keys that benefits
queries.
If you need to reindex then you should do this off-hours. Rebuilding the
clustered index will cause a non-clustered rebuild as well. You can also
defrag tables/indexes using DBCC INDEXDEFRAG.
David Gugick
Imceda Software
www.imceda.com|||Amit,
Have a look into the below article. This is really great.
http://www.microsoft.com/technet/prodtechnol/sql/2000/maintain/ss2kidbp.mspx
Thanks
Hari
SQL Server MVP
"Amit Patel" wrote:
> Well i have a database on my production server which is containing a table
> having 10 million records and daily 10 - 20 K records are being inserted into
> the same. The Table is also containing 25 indexes on different columns so
> which is best time and way to reindex my table for newly inserted records.
> Please help

No comments:

Post a Comment