December 2, 2002 at 4:36 pm
I've got a weird select problem in SQL Server 2000
When I use this query,
"SELECT * FROM MyView", I get a resultset in about 18 seconds (myView is a conglomeration of serveral other views many layers deep, and not my doing!).
When I use this query,
"SELECT dummyColumn FROM MyView", I get a resultset in about 20 minutes! This flies in the face of everything I've learned about writing good sql. Has anyone encountered this before?
Thanks,
Marlon
December 2, 2002 at 7:22 pm
It may have a good reason but the best way to find out is to compare the execution plans and see what is different between them.
December 10, 2002 at 10:55 am
I ended up rewriting the view. Where I work, they love to pile view upon view upon view. That seems to be the biggest problem with sql server. Anyway, got it down to 2 secs regardless of how you call it now.
Thanks for your advice
December 10, 2002 at 10:59 am
I understand your issue and have seen many times. You should avoid using views to create views with a deep level as you will take performance hits in many cases.
December 10, 2002 at 11:37 am
I second the "no views in views" position. It's easy enough to break things with the broken things breaking other things too!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy