Re: Views

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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)
.



Relevant Pages

  • Re: Time calculations utilizing three different time formats
    ... Create Table1, Field EQ, type Text. ... From the database window select Query/New/Design View/Close and then from the Query Menu View/SQL and pasted the above SQL statement. ... Dim mins As Integer ...
    (comp.databases.ms-access)
  • Re: Help with this query
    ... FROM Table1 ... View/SQL and paste the above SQL statement into it. ... I need to include in query1, a where clause that will select all the ... I can add this statement, but when I do, the query returns a result ...
    (comp.databases.ms-access)
  • Re: Count Function
    ... FROM table1 ... The query fuctions when I ... The SQL statement could not be executed becuase it contains ambiguous ... that performs the first join and then include that query in your SQL ...
    (microsoft.public.access.queries)
  • Re: variable equals executed SQL statement
    ... A query doesn't return a value. ... but I think you are looking for the Dmax Function instead. ... Dan wrote:> How can you assign a variable to equal the results of> executing a SQL statement. ...
    (microsoft.public.access.forms)
  • Re: Generate Reports from Multiple Tables
    ... How does your query link the two tables? ... Post the SQL statement of your ... Are you absolutely certain that every record in your table1 has a ... corresponding record in table2? ...
    (microsoft.public.access.reports)