Viewing 13 posts - 376 through 388 (of 388 total)
For anyone wanting a complete solution, this one was customised to avoid looking at tables containing identities, as well as Unique Indexes.
This saves a huge chunk of time in skipping...
August 16, 2011 at 5:23 am
Hi Tom,Nice to hear my environment is far better than I thought. The picture you paint is bleak.
My circumstance is legacy columns, too many indexes on high trans tables (one...
August 12, 2011 at 10:24 am
In addition to Tom's solution, there is another modification here to return rows where the Identity for the table has been excluded from the comparison.
create procedure dbo.finddups
...
August 11, 2011 at 3:53 am
Thanks tom
Only really had to add
SET @sql = ''
select @sql = @sql+','+'['+C.name+']' from sys.columns C
to take care of columns with spaces in the name and now I'm good to...
August 11, 2011 at 3:02 am
Thanks Tom
This is the direction I wanted to go in.
At worst, I would then replace table name and run your dynamic query together with information schema.
At best, I can use...
August 11, 2011 at 2:26 am
Thanks
Somehow this query is returning records which dont have duplicates, but what will help me a lot is the
sp_msforeachtable
Thanks for the hint!
August 10, 2011 at 7:31 am
Thanks for the response.
Yep, as I specified in my query, that is how it is done, with a particular query for a particular table.
What I am looking for is a...
August 10, 2011 at 1:59 am
Thanks Champ and GM.
All these indexes look like they were supposed to have included columns, or had them removed from the index later due to space but preserving the...
August 3, 2011 at 2:28 pm
Create the common factor index without the included columns initially. Both queries should use this index, unless the index already exists on the table.
The reason you want to include...
August 3, 2011 at 12:43 pm
BW_Toro (7/6/2011)
July 6, 2011 at 11:15 am
Brian O'Leary (7/5/2011)
doranmackay (7/5/2011)
So when you have stuff like "where [datetimecolumn] >=getdate()" (if datetimecolumn is indexed)
the optimizer says "You know...
July 5, 2011 at 4:15 pm
Did you know it is possible to create duplicate indexes on one table, both non clustered?
One will never be used, but will cost in inserts and updates.
What reason would there...
July 5, 2011 at 1:49 pm
For me it was quick to find the root cause.
I found many non clustered indexes included dateTime as part of a covering index. 6 indexes on the main mothershiptable of...
July 5, 2011 at 1:43 pm
Viewing 13 posts - 376 through 388 (of 388 total)