Re: Views
- From: Hugo Kornelis <hugo@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 25 Oct 2005 23:21:07 +0200
On Tue, 25 Oct 2005 01:48:05 -0700, Travis wrote:
>Hi ,
>
> If I create a view consist of this query "Select Sum(Amt) From Table1".
>Is it increase the performance rather then pass the "Select Sum(Amt) From
>Table1" SQL statement to the reporting tools ?
Hi Travis,
The best analogy for a normal view is a macro in many program languages:
the name of the view gets replaced with it's definition before it is
sent to the query optimiser.
Executing SELECT ... FROM ViewName would normally result in exactly the
same performance as executing the SELECT statement that was used to
create the view.
Indexed views are a different cup of tea. When you create an index on a
view, the data in the view is physically stored on your disk. This is
particularly useful if you have views that contain lots of aggrregated
data, are queried quite often, and the underlying data doesn't change
often.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)
.
- Prev by Date: Re: Separate values from column
- Next by Date: Re: Compare Character to numberic
- Previous by thread: Re: Separate values from column
- Next by thread: Re: Compare Character to numberic
- Index(es):
Relevant Pages
|
|