Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: materialized view for this?

Re: materialized view for this?

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Mon, 10 Jan 2005 15:14:29 -0800
Message-ID: <41e30b2a$1_4@127.0.0.1>


wolfing1_at_yahoo.com wrote:

> Hello.
> I'm trying to speed up some queries that just take too long to run in
> our applications.
> I have a big historical table of the form:
> Table A:
> day date,
> amt1 number,
> amt2 number,
> amt3 number,
> other1 varchar2,
> other2 varchar2
>
> so I was wondering if I should create a materialized view like this:
> select trunc(day),sum(amt1),sum(amt2),sum(amt3),max(other1) from A
>
> Would the query rewrite feature know how to rewrite a statement like
> this:
> select trunc(day)-4,sum(amt1) from A where other1='test'
> ?

And your Oracle version is?

But generally speaking yes ... make sure you have current statistics with DBMS_STATS.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= East/West-Coast Server Farms - Total Privacy via Encryption =---
Received on Mon Jan 10 2005 - 17:14:29 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US