Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Code Re-Use Via Views
windcliff_at_gmail.com says...
> Much of my group works on a reporting application. In order to achieve
> greater SQL re-use we have tried to use views to avoid re-writing the
> same portions of SQL. The problems we've run into so far include: (i)
> union-alls in views seem to force evaluation of the view rather than
> merging with the larger SQL statement, (ii) transposing of certaing
> columns slows down a query quite a bit, (iii) making new rows appear
> based on joins to an inline view on dual (e.g., select 0 as flag from
> dual union all select 1 from dual) as flag_view) makes our views run
> slower.
>
> The basic problems we're trying to solve are: (i) code re-used via
> views, (ii) without modifying our schema treat separate table
> polymorphically via views.
Depending of the frequency of report data updates, maybe look at materialized views.
Geoff M Received on Mon Jan 09 2006 - 16:27:35 CST