View vs Stored Procedure

Posts   
 
    
hplloyd
User
Posts: 191
Joined: 29-Oct-2004
# Posted on: 01-Aug-2005 11:28:41   

We have a view with a complex WHERE clause that is taking a long time to process because it has a load of nested SELECT statements in the WHERE clause

We have found that by redesigning the view as a stored procedure with good use of paremeters makes a huge difference in performance.

We cannot see how to retrieve the results of the Stored procedure as a typed dataset, in the same way as we can get typed datasets for views - is there a way round this?

Many thanks

Fishy avatar
Fishy
User
Posts: 392
Joined: 15-Apr-2004
# Posted on: 01-Aug-2005 16:18:28   

I'm sure someone will correct me if I'm wrong here. You can't create a Typed Dataset from a stored procedure because the output cannot be assertained. You can create it from a View because the structure can be determined. I believe you can fill an entitycollection from a stored procedure but I have not done that.

Hope that helps,

Fishy