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: Problems with Views?

Re: Problems with Views?

From: TurkBear <jgreco1_at_mn.rr.com>
Date: Fri, 16 Aug 2002 10:23:30 -0500
Message-ID: <446qlusida9a4101ad8prja72hm3g30fv7@4ax.com>

Have you run the query under SqlPlus after issuing a SET AUTOTRACE ON
command?

This will show you the execution plan and should answer some of the questions.

Just an initial thought..

vinnyop_at_yahoo.com (Vince) wrote:

>We use views to simplify front-end development (using a persistence
>tool - TopLink). As we are getting closer to actual devivery, I am
>getting concerned about the performance of such an approach. The
>following is an example of a query executed using such a view (we
>don't inline the view as shown below):
>
>SELECT state, COUNT(*), sum(dollars)
>FROM (
> -- here is the view
> SELECT country,
> state,
> city,
> to_char(some_date, 'YYYYMM') as service_month,
> sum(big_bucks) as money
> FROM table t1,
> table t2
> WHERE t1.joins = t2.joins
> GROUP BY country, state, city, to_char(some_date, 'YYYYMM')
> -- end view
> )
>WHERE country = 'ATLANTIS'
>GROUP BY state
>
>Does this query first build the results of the view before the outer
>statement? Or will the outer select's where clause be incorproated
>into the inner (view)?
>
>I realize it would be better to construct the query without the view,
>but we are using the underlying view to provide semi-customizable
>reporting where the outer select is dynamic (but limited to the group
>by columns within the view). I am just wondering how bad it is.
>
>Thanks in advance, Vince

-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------

   http://www.newsfeed.com The #1 Newsgroup Service in the World! -----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =----- Received on Fri Aug 16 2002 - 10:23:30 CDT

Original text of this message

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