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
 General SQL Server Forums
 New to SQL Server Programming
 optimizing a query

Author  Topic 

msrs

32 Posts

Posted - 2007-11-27 : 05:30:04
hi all

Ifor
Aged Yak Warrior

700 Posts

Posted - 2007-11-27 : 06:29:13
1. Check your indexes.
2. Look at putting the logic in the functions into the main query.
Go to Top of Page

PeterNeo
Constraint Violating Yak Guru

357 Posts

Posted - 2007-11-27 : 06:31:10
Hi Msrs,

move the conditions to inside of derived table definition

(
(
oatable030.branch_id = '7f4932a5-4709-40c8-a87f-c2d978a2fd2f'
OR oatable030.branch_id = '799b860e-a832-4a68-8e94-fada44bbb7b9'
)
AND oatable030.acc_type_id ! = 'c'
AND oatable030.acc_type_id ! = 'v'
)

and

(
(
OATABLE014.branch_id = '7f4932a5-4709-40c8-a87f-c2d978a2fd2f'
OR OATABLE014.branch_id = '799b860e-a832-4a68-8e94-fada44bbb7b9'
)
AND OATABLE014.acc_type_id ! = 'c'
AND OATABLE014.acc_type_id ! = 'v'
)

Go to Top of Page

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2008-01-09 : 03:54:33
Is this another case of the OP deleting his question after it has been answered, making it difficult for others to learn from?


Duane.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2008-01-09 : 04:42:59
quote:
Originally posted by msrs

hi all


What is the point in deleting the question?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2008-01-09 : 04:44:13
It has just been done to all of his questions. Really silly.


Duane.
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-09 : 05:29:06
Or he realized SQL is not his cup of tee and decided to leave the business?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-01-09 : 05:30:30
Or he realized SQL is not his cup of tee and decided to leave the business?


E 12°55'05.25"
N 56°04'39.16"
Go to Top of Page

jdaman
Constraint Violating Yak Guru

354 Posts

Posted - 2008-01-09 : 12:21:46
quote:
Originally posted by msrs

hi all



Well this is useful.
Go to Top of Page
   

- Advertisement -