SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Reading results from sys.dm_db_index_physical_stat
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

bryan42
Starting Member

28 Posts

Posted - 03/06/2007 :  13:04:19  Show Profile  Reply with Quote
Could you help me understand the results of running sys.dm_db_index_physical_stats?
select top 10 * from sys.dm_db_index_physical_stats(db_id('web_db1'), OBJECT_ID('tblUser'), NULL, NULL, 'DETAILED');


I see this table. Two HEAP indexes seem to have issues. Shall I simply rebuild the index for this table. How may I convert a table to have a clustered index if it has lots of transactions?


obj_id | avgFrag% | frag_cnt | avgFragPages | avgPageSpace% | recCnt | index_type
21575115	0	1	1	19.25	18	HEAP
21575115	0	1	1	3.31	18	NONCLUSTERED INDEX
47339233	68.21	122	9.06	94.6	222716	HEAP
47339233	0	19	26.16	99.63	222716	NONCLUSTERED INDEX
47339233	0	1	2	73.66	497	NONCLUSTERED INDEX
47339233	0	1	1	0.57	2	NONCLUSTERED INDEX
47339233	0	21	24.9	99.94	222716	NONCLUSTERED INDEX
47339233	0	1	2	80.74	523	NONCLUSTERED INDEX
47339233	0	1	1	0.59	2	NONCLUSTERED INDEX
53575229	33.33	5	19.2	98.96	23306	HEAP

pareshmotiwala
Constraint Violating Yak Guru

USA
322 Posts

Posted - 03/09/2007 :  12:30:51  Show Profile  Visit pareshmotiwala's Homepage  Click to see pareshmotiwala's MSN Messenger address  Send pareshmotiwala a Yahoo! Message  Reply with Quote
In SSMS, go to the table in that database. Right click on the indexes and create a new one.
Go to Top of Page

bryan42
Starting Member

28 Posts

Posted - 03/09/2007 :  20:42:44  Show Profile  Reply with Quote
Thanks. Is there an easy way to use an object ID to obtain the table name?
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.19 seconds. Powered By: Snitz Forums 2000