🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: bit.databases.mssql-l
Article #2040

Views / Procedures

#2040
From: Chris Gadsby
Date: Wed, 26 Apr 1995 00:00
31 lines
1508 bytes
A view will appear to a user as equivalent to a table - i.e. they can
query the view and the server will dynamically produce the query onto
the base table.  Thus all the overhead of the view is at the time the
view is queried.

A stored procedure on the other hand would have to either populate a
holding table for later use or be called from the application program
and some way so extracting the results obtained as for querying the
view.

Pros & Cons?

The direct view query is the most flexible but possibly the slowest.

Using a stored procedure to populate a holding file splits the
processing time and for complex summary operations is useful to give a
fast response to the user at the expence of the data being a bit out of
date.

Using a stored procedure called by the user app is a comprimise between
the to - it is static sql so should be quicker to execute than dynamic
sql - but the user is limited to the predefined query compiled into the
procedure.

Hope this helps.

Comments apprieciated I'm no theoretician.


Chris Gadsby
cjg2@student.open.ac.uk
Technical Details
Message-ID: <memo.43586@cosy.open.ac.uk>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f6611,9199f49242762785,start
X-Google-Attributes: gidf6611,public
From: Chris Gadsby <cjg2@STUDENT.OPEN.AC.UK>
Subject: Views / Procedures
Date: 1995/04/26
Message-ID: <memo.43586@cosy.open.ac.uk>
X-Deja-AN: 101647580
sender: Microsoft SQL Server Discussion List
comments: Gated by NETNEWS@AUVM.AMERICAN.EDU
newsgroups: bit.databases.mssql-l