470,619 Members | 1,790 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,619 developers. It's quick & easy.

Query runs slower when converted to a view

I have a query I developed and optimised as well as possible before
converting to a view.

When running in query analyser the query runs in 15 to 18 seconds -
which is acceptable.

When "converting" into a view ( This is necessary for operational
reasons) and running with the same parameter it runs in 3 to 4
minutes.

Is there something I am unaware of ( well of course there is !!) -

I was wondering why this occurs and how I can avoid / correct the
issue.

All advice gratefully received.

Dave ( Still learning stuff about SQL Server every day!!)

Jul 23 '05 #1
1 1390
Ray
You'll need to start by comparing the query plan from each. What is
different between the two? Did you hard code the values in the where clause
of the query versus passing parameters to the view?

Posting the query and the create view will help the group answer your
question.

Ray

"djbigpond" <da***********@cpaaustralia.com.au> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
I have a query I developed and optimised as well as possible before
converting to a view.

When running in query analyser the query runs in 15 to 18 seconds -
which is acceptable.

When "converting" into a view ( This is necessary for operational
reasons) and running with the same parameter it runs in 3 to 4
minutes.

Is there something I am unaware of ( well of course there is !!) -

I was wondering why this occurs and how I can avoid / correct the
issue.

All advice gratefully received.

Dave ( Still learning stuff about SQL Server every day!!)

Jul 23 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Eugenio | last post: by
6 posts views Thread by Umar Farooq | last post: by
29 posts views Thread by wizofaus | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.