Re: Single Complex Query Vs Temoprary Table

From: Alex Filonov <afilonov_at_yahoo.com>
Date: 16 Jul 2003 12:19:02 -0700
Message-ID: <336da121.0307161119.582b28c2_at_posting.google.com>


hardikarm_at_yahoo.com (Mahesh Hardikar) wrote in message news:<4a1c57c2.0307160331.58838584_at_posting.google.com>...
> Hi ,
>
> Oracle 8.1.7.0.0 on HP-UX 11.0
>
> I am a newbie as far as PL-SQL is concerned . I have Sybase/MSSQL
> T-SQL background.
>
> We have a report which uses a select statement . This select statement
> joins 15 tables . SOme of the tables are outer joined.
> It runs much slow when parameters (From & To Date) are for a month.
> Like From Date = Jun 1 , To Date = Jun 30. Report does not complete
> even after 30 mins.
>
> I was thinking to break this query in smaller parts. I am trying to
> minimise no of tables used in single statement to around 6.
>
> I want to use Global Temporary table , insert data in temp table by
> joining few tables. Rest of the columns of Temporary tables will be
> updated thru subsequent updates. Finally a select statement from
> temporary table will populate the report .
>
> Will it be a good approach (in Oracle PL-SQL) as far as performance is
> concrened ? Are there any performance issues using Global temporary
> table ?
>

PL/SQL is wrap-up procedural language. Queries are written in SQL.

Approaches to tuning:
1. Short approach: run explain plan on the query and post results. 2. Long (and proper) approach: read 2 Oracle books at least, Concepts and Tuning.

> Any help in this regards is highly appreciated ....
>
> Thanks & Regards,
> Mahesh Hardikar
Received on Wed Jul 16 2003 - 21:19:02 CEST

Original text of this message