开发者

SQL server : XML : Data Base Table Optimization

I have a SQL server DB , which have a Table , which Log every Exceptions with details along with 2 XML's (1 for Requ开发者_Python百科est , 1 for Response).

These 2 XML's are Compressed.

Now as the Data volume is high , I need to clean the Table in every 3-4 month.

What are the Optimization technique , I can use to avoid Data Clean up's.


  1. Create Indexes on all columns that require searching.
  2. Run optimize table tablename (or similar according to your RDBMS) through cron job every day.


Probably the best thing you can look into is table partitioning, which will allow you to quickly remove data when it needs age out. Also, make sure that you cluster your index on a monotonically increasing value (either a surrogate identity value or a datetime column, like dateofreciept); this will reduce fragmentation on the clustered index.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜