Click here to Skip to main content
15,905,683 members
Home / Discussions / Database
   

Database

 
GeneralRe: SQL Server Access Pin
Wendelius25-Feb-09 7:15
mentorWendelius25-Feb-09 7:15 
QuestionBreak point in sqlserver Pin
venu65617-Feb-09 21:53
venu65617-Feb-09 21:53 
AnswerRe: Break point in sqlserver Pin
Wendelius17-Feb-09 23:23
mentorWendelius17-Feb-09 23:23 
QuestionImprove the speed of Function Pin
member2717-Feb-09 15:05
member2717-Feb-09 15:05 
AnswerRe: Improve the speed of Function Pin
PIEBALDconsult17-Feb-09 16:05
mvePIEBALDconsult17-Feb-09 16:05 
AnswerRe: Improve the speed of Function Pin
Mycroft Holmes17-Feb-09 16:05
professionalMycroft Holmes17-Feb-09 16:05 
GeneralRe: Improve the speed of Function Pin
member2718-Feb-09 3:41
member2718-Feb-09 3:41 
AnswerRe: Improve the speed of Function Pin
Wendelius17-Feb-09 17:57
mentorWendelius17-Feb-09 17:57 
Typically if you break down a single query to multiple different operations using a function or a procedure, the result can be slower. Because if you have separate SQL statements there's no way for the optimizer to search for the best plan to the whole query, only for the subcomponents.

Also if you use temp tables and update and select them, you'll most likely cause physical I/O which may/may not be prevented when using a single query.

Sometimes it's just impossible to write a single query for a certain task, but if you do have the opportunity, you should test the results using this approach (create a single query, combine few operations thus eliminating intermediate steps etc).

Another thing is indexing. Make sure that you have adequate indexes and on the righ columns (or column combinations).

For further details, I think you should post the code you currently have.

The need to optimize rises from a bad design.My articles[^]

Questionquery to get results from 4 tables Pin
icanmakeiteasy17-Feb-09 0:29
icanmakeiteasy17-Feb-09 0:29 
AnswerRe: query to get results from 4 tables Pin
Wendelius17-Feb-09 1:37
mentorWendelius17-Feb-09 1:37 
GeneralRe: query to get results from 4 tables [modified] Pin
icanmakeiteasy17-Feb-09 1:54
icanmakeiteasy17-Feb-09 1:54 
GeneralRe: query to get results from 4 tables Pin
Wendelius17-Feb-09 2:36
mentorWendelius17-Feb-09 2:36 
GeneralRe: query to get results from 4 tables Pin
icanmakeiteasy17-Feb-09 19:02
icanmakeiteasy17-Feb-09 19:02 
AnswerRe: query to get results from 4 tables Pin
venu65617-Feb-09 1:45
venu65617-Feb-09 1:45 
GeneralRe: query to get results from 4 tables Pin
icanmakeiteasy17-Feb-09 1:57
icanmakeiteasy17-Feb-09 1:57 
AnswerRe: query to get results from 4 tables Pin
icanmakeiteasy17-Feb-09 22:45
icanmakeiteasy17-Feb-09 22:45 
QuestionCASE when false query [modified] Pin
foryou16-Feb-09 23:40
foryou16-Feb-09 23:40 
AnswerRe: CASE when false query Pin
foryou17-Feb-09 1:02
foryou17-Feb-09 1:02 
GeneralRe: CASE when false query Pin
Wendelius17-Feb-09 7:57
mentorWendelius17-Feb-09 7:57 
GeneralRe: CASE when false query Pin
foryou17-Feb-09 22:47
foryou17-Feb-09 22:47 
GeneralRe: CASE when false query Pin
Wendelius18-Feb-09 7:37
mentorWendelius18-Feb-09 7:37 
GeneralRe: CASE when false query Pin
foryou19-Feb-09 1:55
foryou19-Feb-09 1:55 
GeneralRe: CASE when false query Pin
Wendelius19-Feb-09 5:53
mentorWendelius19-Feb-09 5:53 
GeneralFormulas in SQL Server Reporting Services Pin
dboy22116-Feb-09 11:04
dboy22116-Feb-09 11:04 
GeneralRe: Formulas in SQL Server Reporting Services Pin
Diving Flo17-Feb-09 23:44
Diving Flo17-Feb-09 23:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.