March 31, 2010 at 6:53 am
Dear All
i was executing this query on my database server
select avg_fragmentation_in_percent,name from sys.dm_db_index_physical_stats(db_id('ebpl_prod'),object_id('transactions'),null,null,'sampled') a,sys.indexes b
where a.index_id =b.index_id and a.object_id= b.object_id
and i was getting avg_fragmentation_in_percent and name of that index and i found that in one index fragmentation percent is around 25 % so i reorganize that index
it but when i am again executing this same query again i am getting no result from this query please reply immediately
select avg_fragmentation_in_percent,name from sys.dm_db_index_physical_stats(db_id('ebpl_prod'),object_id('transactions'),null,null,'sampled') a,sys.indexes b
where a.index_id =b.index_id and a.object_id= b.object_id
March 31, 2010 at 8:31 am
Dear All
Waiting for your valuable suggestion one more question in my mind i have ...does the reorganizing one of table will decrease the fragmentation for other index also..please reply:-)
March 31, 2010 at 8:48 am
March 31, 2010 at 8:52 am
Sir i use this query to reorganize
alter index IX_TXNDATE_SRVID on transactions
reorganize;
March 31, 2010 at 9:08 am
In that case it should only have reorganized that specific index. I thought you might have used the ALL parameter on a table which would have done all indexes on that one table.
March 31, 2010 at 9:19 am
But i was using this query only (alter index IX_TXNDATE_SRVID on transactions
reorganize;) ...
please some give me the valid answer please...
:unsure:
March 31, 2010 at 9:29 am
How many results where you getting before?
Did you by any chance change the Database selected in SSMS? If you are not in the same database where the tables reside in, you will receive no results unless you add the database to the sys.indexes table reference, ie:
select avg_fragmentation_in_percent,name from sys.dm_db_index_physical_stats(db_id('ebpl_prod'),object_id('transactions'),null,null,'sampled') a,ebpl_prod.sys.indexes b
where a.index_id =b.index_id and a.object_id= b.object_id
March 31, 2010 at 9:36 am
thanks for getting me that point master database was selected as default at that point so not getting data now got the data thanks a lot....i need one more help dear i have very big confusion in locking concept that how and which lock have more priority in which transaction isolation level please tell me some link so that i can go through that..thanks again dear:satisfied:
March 31, 2010 at 10:02 am
I'd suggest creating a new post with that inquiry, so it gets proper attention. Embedding it here will probably not produce answers you need, plus it makes it more difficult when searching for solutions. By the way, have you tried searching for that? I am sure it has been covered many times.
March 31, 2010 at 10:03 am
anshu84onnet (3/31/2010)
thanks for getting me that point master database was selected as default at that point so not getting data now got the data thanks a lot....i need one more help dear i have very big confusion in locking concept that how and which lock have more priority in which transaction isolation level please tell me some link so that i can go through that..thanks again dear:satisfied:
See Lock Modes and Lock Compatibility
And please, for the love of all that is good, please stop calling us 'dear'. It makes me cringe.
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
March 31, 2010 at 10:04 am
Richard M. (3/31/2010)
I'd suggest creating a new post with that inquiry, so it gets proper attention. Embedding it here will probably not produce answers you need, plus it makes it more difficult when searching for solutions. By the way, have you tried searching for that? I am sure it has been covered many times.
Oops! 🙂
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
Viewing 11 posts - 1 through 10 (of 10 total)
You must be logged in to reply to this topic. Login to reply