March 24, 2005 at 1:19 pm
Hello Everyone,
It would be very helpfull to have a view called:
INFORMATION_SCHEMA.INDEXES
That gives informations about all the index from the current user in the database.
Does this enhancement in place for Yukon?
Best regards,
Carl
March 24, 2005 at 1:24 pm
I don't know about Yukon but :
exec sp_helpIndex 'Table_ViewName'
can get you started.
March 24, 2005 at 1:32 pm
Hello Remi,
For sure, the code behind sp_helpindex will help me, but it would be so nice and simple to have the same kind of information given by INFORMATION_SCHEMA for contraints or columns.
Don't understand why it is not there.
Regards,
Carl
March 24, 2005 at 2:14 pm
Sure would be nice... but it doesn't take lon to build the query to fetch the info yourself.
August 9, 2011 at 5:51 am
Hi,
May be following query will be helpful for you OR someone else.
select
object_schema_name(object_id),
object_name(object_id),
name,
'ALTER INDEX ' + name + ' ON '+object_schema_name(object_id)+'.'+object_name(object_id)+' REBUILD;'
,*
fromsys.indexes
wheretype > 0
order by
object_schema_name(object_id),
object_name(object_id)
August 9, 2011 at 5:58 am
Thanks for pointing out the new system objects.
Couples points.
Heaps should not be ignored when doing index maintenance.
You shouldn't blindly rebuild all index without there being a need for it.
This is what I use to be as efficient as possible.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply