473,388 Members | 1,327 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

View or Stored Procedures

I have a very complex view which we've been working with for some
time. As we have progressed with this view, we have reached the stage
where the data is generated into a table which is then used in our
reporting application. This has improved reporting performance
considerably.

There is a stored procedure which copies the data from the view into a
table. Very simple select into statement.

However, I was wondering if I actually held the query code in the
stored procedure, would this improve performance ?

The only user for this would be the server for getting to the data in
the view and generating into a table.

I know it's a very general question, but would I see any performance
difference doing this as an SP instead of an SP calling a view ?

Would appreciate any constructive comments. Not posting the view as
it'll be too long, but FWIW, using SQL 7.
Jul 20 '05 #1
1 3457

"Ryan" <ry********@hotmail.com> wrote in message
news:78**************************@posting.google.c om...
I have a very complex view which we've been working with for some
time. As we have progressed with this view, we have reached the stage
where the data is generated into a table which is then used in our
reporting application. This has improved reporting performance
considerably.

There is a stored procedure which copies the data from the view into a
table. Very simple select into statement.

However, I was wondering if I actually held the query code in the
stored procedure, would this improve performance ?

The only user for this would be the server for getting to the data in
the view and generating into a table.

I know it's a very general question, but would I see any performance
difference doing this as an SP instead of an SP calling a view ?

Would appreciate any constructive comments. Not posting the view as
it'll be too long, but FWIW, using SQL 7.


It probably won't improve performance substantially, because normal views
(ie. not an MSSQL 2000 indexed view) are 'transparent' to queries. When you
query the view, its definition is plugged in to the query before being
executed. Having said that, the only way to be sure is to test, and if the
performance is equivalent, then it may come down to whether you want to
maintain one object or two. If the view is re-used in other queries, though,
or if you need it in place for security reasons, then those are good grounds
for keeping it.

Simon
Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Shinpei Kuga | last post by:
I have MS SQL Server 7 and over the years have built quite a few Stored Procedures. It would be extremely convenient if I could print out or view ALL the text of ALL the stored proceudres at once....
4
by: MD | last post by:
I am trying to create a dynamic SQL statement to create a view. I have a stored procedure, which based on the parameters passed calls different stored procedures. Each of this sub stored procedure...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
5
by: Tim Marshall | last post by:
I was following the thread "Re: Access Treeview - Is it Safe Yet?" with interest and on reading the post describing Lauren Quantrell's SmartTree, I've run into something I don't understand: Stored...
2
by: Justin | last post by:
I am creating a web app for a client in VS.NET using ASP.NET with C#. I need to query three tables in a database using one parameter and display the results on the page. my question is should I use...
6
by: Woody Splawn | last post by:
I am using SQL Server 2000 as a back-end to a VS.net Client/Server app. In a certain report I use a view as part of the query spec. For the view, at present, I am querying for all the records in...
1
by: mimo | last post by:
Hi, I'm trying to use Stored Procedures with a Grid View and everytime I try the update and the delete stored procedures fail. By the way I am doing this through the wizard. Is there a...
104
by: Beowulf | last post by:
I have the view below and if I use vwRouteReference as the rowsource for a combo box in an MS Access form or run "SELECT * FROM vwRouteReference" in SQL Query Analyzer, the rows don't come through...
6
by: Greg P | last post by:
I am using VS2005 and have been learning a ton about databinding. I know that when you drag a view from the datasource window (creating a dataGridView) that an update method is not added to the...
1
by: Jason Wilson | last post by:
I was looking to improve the performance of an ASP.NET application by creating the an indexed view that could be used instead of some of the root tables. What I didn't realize is that it would...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.