Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: materialized view for this?
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
![]() |
![]() |