Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««1234»»»

Index usage overview Expand / Collapse
Author
Message
Posted Tuesday, March 23, 2010 9:31 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, March 04, 2014 9:40 AM
Points: 1,081, Visits: 1,473
I get 0 rows returned. tried it on several DB's.

Tim White
Post #888240
Posted Tuesday, March 23, 2010 10:04 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 6:40 AM
Points: 925, Visits: 1,092

I guess it doesn't work on SQL 2000 (which is what I am using)?


Sorry, MSSQL 2005 and higher


Wilfred
The best things in life are the simple things
Post #888287
Posted Tuesday, March 23, 2010 7:02 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Sunday, March 24, 2013 6:56 PM
Points: 6, Visits: 42
Hi,

Thanks. I removed those empty spaces.. !! Its "completed" successfully.

However its turned out as 100% successfull, I can possibly run the view and its turns out as nothing. And I run across the same procedure into few DB's.

L
Post #888618
Posted Wednesday, March 24, 2010 1:36 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 6:40 AM
Points: 925, Visits: 1,092
This view will only work in the database the view is created:
and        a.database_id = DB_ID()            -- for current database only

(that's the only thing which comes into my mind, or there are no indexes in the database )

Try cutting this view into smaller pieces, for example first query the dm_ view, add join on sysindexes etc.



Wilfred
The best things in life are the simple things
Post #888723
Posted Monday, March 29, 2010 2:29 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 26, 2014 12:36 PM
Points: 256, Visits: 1,063
Wilfred,

What is the purpose of this elaborate query?

(NOTE: I have commented out the ALTER INDEX (DISABLE) statement until I get an explanation of what the query is supposed to do.)

I've run it against several test databases using SS2005 and SS2008. Without the ALTER INDEX (DISABLE) clause enabled, it appears to do nothing.

LC

Post #892198
Posted Monday, March 29, 2010 2:45 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:28 PM
Points: 20,453, Visits: 14,063
crainlee2 (3/29/2010)
Wilfred,

What is the purpose of this elaborate query?

(NOTE: I have commented out the ALTER INDEX (DISABLE) statement until I get an explanation of what the query is supposed to do.)

I've run it against several test databases using SS2005 and SS2008. Without the ALTER INDEX (DISABLE) clause enabled, it appears to do nothing.

LC



If I may, that line is to create the command to disable an index. It looks to be purely optional and is only the text of the command. The command would need to be copied and executed separately.




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #892213
Posted Monday, March 29, 2010 2:45 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:28 PM
Points: 20,453, Visits: 14,063
Nice Script. I think I can find some use for it.



Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #892214
Posted Monday, March 29, 2010 4:03 PM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Yesterday @ 6:40 AM
Points: 925, Visits: 1,092
crainlee2 (3/29/2010)
Wilfred,

What is the purpose of this elaborate query?

(NOTE: I have commented out the ALTER INDEX (DISABLE) statement until I get an explanation of what the query is supposed to do.)

I've run it against several test databases using SS2005 and SS2008. Without the ALTER INDEX (DISABLE) clause enabled, it appears to do nothing.

LC



It's an easy way to disable a low performing index, by copy/paste this disable statement


Wilfred
The best things in life are the simple things
Post #892277
Posted Monday, March 29, 2010 6:13 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, February 26, 2014 12:36 PM
Points: 256, Visits: 1,063
Thanks.

LC
Post #892354
Posted Wednesday, March 31, 2010 4:18 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 7:28 PM
Points: 20,453, Visits: 14,063
I have taken this script provided by Wilfred and updated it to SQL 2005.

If interested, you can read about it at:
http://jasonbrimhall.info/?p=407




Jason AKA CirqueDeSQLeil
I have given a name to my pain...
MCM SQL Server


SQL RNNR

Posting Performance Based Questions - Gail Shaw
Posting Data Etiquette - Jeff Moden
Hidden RBAR - Jeff Moden
VLFs and the Tran Log - Kimberly Tripp
Post #894277
« Prev Topic | Next Topic »

Add to briefcase ««1234»»»

Permissions Expand / Collapse