Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 query optimization

Author  Topic 

Jomypgeorge
Starting Member

31 Posts

Posted - 2010-09-17 : 03:07:47
Hi team,
I am not a database expert but writing stored procedures for last 3 months.
In my job i never used execution plan and not cared about query optimization till.
I just take care to avoid inner queries, functions and unions if possible.

Can u give advise on query optimization?
What are the things i should care on writing a query?

Thanks in advance

Sachin.Nand

2937 Posts

Posted - 2010-09-17 : 03:12:05
Have you read any book?

I would suggest you to read
"SQL Server Execution Plans by Grant Fritchey"


Limitations live only in our minds. But if we use our imaginations, our possibilities become limitless.

PBUH
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2010-09-17 : 04:49:00
INNER JOINS are your friends!
If the database is properly designed fo course.



N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2010-09-17 : 09:39:02
I think by INNER QUERY the O/P may have meant Nested Sub Queries .... but I don't think that "avoid inner queries, functions and unions if possible" is a means of optimising queries, experience tells you what you can safely use and when ... knowing how to interrogate the Query Plans to see how the query was "solved" has been my route to gaining the experience to more instinctively know what is likely to work best.
Go to Top of Page
   

- Advertisement -