August 23, 2009 at 10:08 pm
Hi all,
Can someone tell me
1. which T-SQL keywords use more time than others? I want to know the list.
2. If you have any links for this, please share me.
Currently, I need to do modification for an existing Database hosted on SQL Server 2000.
I'm not a DBA, so please kindly don't assume I know how SQL Server works.
I'm a programmer, I know basic knowledge about SQL Server and its tools.
Hope you will understand what I'm trying to say.
Thanks.
August 23, 2009 at 10:23 pm
The most common statement in SQL is SELECT. Others are INSERT, UPDATE, and DELETE.
Let me put it to you this way, you shouldn't use ANY of them until you have more knowledge than you do now. If you are taking over from someone who had some skills then making changes would only make a bad situation worse.. Don't make any changes until you understand the language and what is happening..
CEWII
August 24, 2009 at 7:16 am
I wouldn't say that any key words are more time consuming than others. A Select with no where clause will likely take more time to complete than an update or delete with a where clause limiting the action to 1 row. Really the entire statement, database design, and data determine what will take longer.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 24, 2009 at 3:47 pm
Assuming you're trying to work with more than just a few rows per table (or more than one table) I'd consider keywords like CURSOR or WHILE as being a time consuming approach.
August 26, 2009 at 7:21 am
Have a look at these links:
http://www.sqlservercentral.com/articles/Performance+Tuning/2924/
http://stackoverflow.com/questions/543580/equals-vs-like
It is not an easy question to answer because it all depends on what you are doing. Use the Execution plan to show where the most time is being spent in your queries. For example using SELECT DISTINCT can add a delay to a query, but there are occasions when it does exactly what you want.
Hope this helps.
August 26, 2009 at 7:41 am
It depends, and that's the best answer. It's how you use the keywords, not the keywords.
I'd say that you ought to engage someone to help you tune things if you are having performance problems and sit with them to learn why they make changes.
August 26, 2009 at 8:17 am
scsfdev (8/23/2009)
Hi all,Can someone tell me
1. which T-SQL keywords use more time than others? I want to know the list.
2. If you have any links for this, please share me.
Currently, I need to do modification for an existing Database hosted on SQL Server 2000.
I'm not a DBA, so please kindly don't assume I know how SQL Server works.
I'm a programmer, I know basic knowledge about SQL Server and its tools.
Hope you will understand what I'm trying to say.
Thanks.
Definitely understand what you're asking. Simply put, keywords aren't going to be the thing that makes a difference in performance.
Do you have a specific proc that you're trying to improve the performance on? If so, and you'd like some help on it, you could post it here and we'll see what we can do to help. (Or more than one, if that's the case.)
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply