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.
Author |
Topic |
FileAnt
Starting Member
3 Posts |
Posted - 2009-05-25 : 21:18:22
|
I used a huge view inside an 'if' recently and noticed it did short circuit; however, the query still slows down.SET @ADate = NULLIF (@ADate IS NOT NULL)BEGIN INSERT INTO #ABla VALUES (1) ( SELECT bla FROM a huge VIEW WHERE AColumn = 'poop')END |
|
jonasalbert20
Constraint Violating Yak Guru
300 Posts |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-05-25 : 23:25:44
|
quote: Originally posted by FileAnt I used a huge view inside an 'if' recently and noticed it did short circuit; however, the query still slows down.SET @ADate = NULLIF (@ADate IS NOT NULL)BEGIN INSERT INTO #ABla VALUES (1) ( SELECT bla FROM a huge VIEW WHERE AColumn = 'poop')END
Which query is slow ? the huge view or you have other query that is not shown here. KH[spoiler]Time is always against us[/spoiler] |
|
|
|
|
|