开发者

Table fragmentation in SQL server

开发者 https://www.devze.com 2022-12-31 01:25 出处:网络
Anybody have an idea about Table fragmentation in SQL Server(not Index fragmentation). We have a table, this is the main table and its not storing any data permently, data come here and goes out conti

Anybody have an idea about Table fragmentation in SQL Server(not Index fragmentation). We have a table, this is the main table and its not storing any data permently, data come here and goes out continusly. There is no index on this because only insert and delete statements are running frequently. Recently we faced a huge delay for the response from this table. If we select anything it tooks more than 2 to 5 minuts to return result,even there is very few 开发者_JS百科datas. At last we delete and recreate this table and now it's working very fine. Appreciate If any comments,how this is happining?

Joseph


A table without a clustered index is called a heap. A heap can be fragmented too.

Performance would probably improve if you added a clustered index with an auto-increment primary key. A clustered index does not slow deletes or inserts (to the contrary.) In addition, the scheduled routine maintenance will keep tables with a clustered index defragmented.


If you are selecting parts of the data from the table, then it may well be beneficial to have appropriate indexes on the table.

0

精彩评论

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

关注公众号