Viewing 15 posts - 4,696 through 4,710 (of 5,841 total)
1) did the original table have an index on the field you are doing a max on and if so does that index still exist?
2) if an index doesn't exist...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 4, 2009 at 9:12 am
1) the size of the database is actually irrelevant. You could have a 10TB database and a 2 row table that you are looking for dupes in. 🙂
2)...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 4, 2009 at 8:24 am
Eswin (6/4/2009)
Thanks a lot for the script........Is "sys.sql_modules" the alternative for "sysdepends" .
sys.sql_modules.definition contains all code for sql objects. It should be used instead of syscomments if you are...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 4, 2009 at 8:21 am
>>Ooohkaaay. I think I just ran into the scenario where the wrong partitioning can destroy your performance. Shame the documentation isn't a little more explicit on what NOT to do...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 4, 2009 at 7:47 am
Very true words Steve, and the article you link to is spot on as well.
One exception I will take to what you said: "Someone that's worked with...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 3, 2009 at 9:53 am
GSquared (6/3/2009)
steve.neumann (6/3/2009)
do you ever read what you write? 3 more simple mistakes today... not to mention to daily misuse of commas...
The irony of a post complaining about misuse of...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 3, 2009 at 9:47 am
1) You really cannot rely on sysdepends.
2) Nor can you rely on syscomments. That old mechanism has line-wrapping issues and you will miss strings that you should hit. ...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 3, 2009 at 9:42 am
The vendor that supplies the application that uses this system recommended setting this parameter. In their testing they found a significant improvement for their application.
Perhaps because they found that...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 3:09 pm
1) I am curious what among these listed reasons where why you chose to do forced parameterization for your database. See here in BOL:
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/068282b7-c419-4e2c-990a-1f8b7c12762f.htm
I do have a client with...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 2:03 pm
Jeffrey Williams (6/2/2009)
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 11:55 am
alter PROCEDURE Test4 ( @ProdID int = null, @Qty int = null)
AS
select TransactionID
from [Production].[TransactionHistory] -- with (index = [IX_TransactionHistory_ProductID])
where ProductID BETWEEN coalesce(@ProdID, 0) AND coalesce(@ProdID, 99999999) --should use actual limits...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 10:54 am
Interesting. You also get a seek if you simply hard code values for coalesce (and I presume isnull) such as this example. It avoids having to hit the...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 9:38 am
Dave Ballantyne (6/2/2009)
I dont think you attached the right plan, that one has an index scan
DOH!!! Good catch Dave. My brain sure did see seek last night...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 7:06 am
Gail, I ran that test set on SQL 2005 SP2 (can't install SP3 due to missing install code for SP2 apparently). I noticed that I have this index on...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 2, 2009 at 6:46 am
use adventureworks
go
drop proc test
go
create proc test (@productid int = null, @quantity int = null)
as
set nocount on
select *
from [Production].[TransactionHistory]
where (@productid is null or @productid = ProductID) --indexed
and (@quantity is null...
Best,
Kevin G. Boles
SQL Server Consultant
SQL MVP 2007-2012
TheSQLGuru on googles mail service
June 1, 2009 at 6:58 pm
Viewing 15 posts - 4,696 through 4,710 (of 5,841 total)