|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Thursday, April 18, 2013 5:10 AM
Points: 766,
Visits: 274
|
|
gfabbri (8/10/2009) sorry, it is better to put SET NOCOUNT ON, isn't it?
Definitely - SET NOCOUNT ON suppresses the count messages. Kinda wrong way round - the code shown is the opposite what the description meant.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Monday, February 18, 2013 5:56 AM
Points: 10,
Visits: 92
|
|
Hi, I tried with these two statements but the second one is not get executing and it says "Incorrect syntax near the keyword 'exists'." What wrong with this or is this wrong statement?
SELECT * FROM employee WHERE emp_no NOT IN (SELECT emp_no from emp_detail) SELECT * FROM employee WHERE NOT EXISTS (SELECT emp_no FROM emp_detail)
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: 2 days ago @ 3:33 AM
Points: 122,
Visits: 99
|
|
Good set of guidelines Arup... but regarding set nocount do you mean set nocount on?
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Wednesday, November 28, 2012 5:45 AM
Points: 218,
Visits: 37
|
|
I understand that 'where lower(fieldname)' will not use the index on fieldname as the optimizer will look for an index based on the expression on the left of the = Sam Trenchard MCT
|
|
|
|
|
UDP Broadcaster
      
Group: General Forum Members
Last Login: Wednesday, January 02, 2013 12:15 PM
Points: 1,443,
Visits: 711
|
|
| I think you missed a very important point I try to stress to all my developers (unless I missed it in the list), and thats to review your query plan for the stored proc. It's probably one of the most important things to do when creating a sproc.
|
|
|
|
|
SSChampion
        
Group: General Forum Members
Last Login: Wednesday, May 08, 2013 10:33 AM
Points: 10,989,
Visits: 10,529
|
|
I deeply begrudge the minimum one star.
Gail's first post expresses it best, and in milder language terms than I might have used. I would encourage everyone who reads the article to read it too.
This article really needed some serious peer review before being submitted. It wouldn't be so bad if it didn't attempt to sound so authoritative! Please Arup, get some feedback from some of the hugely knowledgeable people on here before publishing - poor advice and dodgy 'tips' will do nothing to enhance your standing or that of SSC, sad to say.
/rant
Paul
Paul White SQL Server MVP SQLblog.com @SQL_Kiwi
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Thursday, May 31, 2012 4:17 AM
Points: 5,
Visits: 39
|
|
Paul White (8/10/2009)
I deeply begrudge the minimum one star. Gail's first post expresses it best, and in milder language terms than I might have used. I would encourage everyone who reads the article to read it too. This article really needed some serious peer review before being submitted. It wouldn't be so bad if it didn't attempt to sound so authoritative! Please Arup, get some feedback from some of the hugely knowledgeable people on here before publishing - poor advice and dodgy 'tips' will do nothing to enhance your standing or that of SSC, sad to say. /rant Paul
Couldn't agree more. I thought SS Central had better editorial standards than this.
|
|
|
|
|
SSC-Enthusiastic
      
Group: General Forum Members
Last Login: Wednesday, April 21, 2010 4:06 AM
Points: 174,
Visits: 46
|
|
| Some points in this article no longer apply, some are mis-leading and some are just incorrect. Please read with caution.
|
|
|
|
|
Grasshopper
      
Group: General Forum Members
Last Login: Thursday, May 16, 2013 9:16 AM
Points: 22,
Visits: 86
|
|
very nice article and must read article.
one question is every thing is true for sql 2008 or not ?
|
|
|
|
|
SSChasing Mays
      
Group: General Forum Members
Last Login: Wednesday, May 15, 2013 10:09 AM
Points: 648,
Visits: 684
|
|
10. WHERE clauses - In a WHERE clause, the various operators used directly affect how fast a query can run. Here are the conditional operators used in the WHERE clause, ordered by their performance. =, >, <, >=, <=, <>, !=, !>, !< for details, refer to the article: http://msdn.microsoft.com/en-us/library/ms190276.aspx
The article you've linked to does not support your point, as far as I can see. That article addresses operator precedence, not performance. Your point may be correct for all I know, but that article doesn't address it one way or the other.
----- a haiku...
NULL is not zero NULL is not an empty string NULL is the unknown
|
|
|
|