Path: news.easynews.com!newsfeed1.easynews.com!easynews.com!easynews!news.he.net!news-hog.berkeley.edu!ucberkeley!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!news-west.eli.net!not-for-mail
Message-ID: <3DF8BD8B.1167F755@exesolutions.com>
From: damorgan <damorgan@exesolutions.com>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: comp.databases.oracle.misc
Subject: Re: Tuning
References: <at8p2l$s4q$1@newsread1.arcor-online.net>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Lines: 25
Date: Thu, 12 Dec 2002 16:47:19 GMT
NNTP-Posting-Host: 156.74.250.7
X-Complaints-To: yvonne.tracy@ci.seattle.wa.us
X-Trace: news-west.eli.net 1039711639 156.74.250.7 (Thu, 12 Dec 2002 09:47:19 MST)
NNTP-Posting-Date: Thu, 12 Dec 2002 09:47:19 MST
Organization: City of Seattle NewsReader Service
Xref: newsfeed1.easynews.com comp.databases.oracle.misc:90475
X-Received-Date: Thu, 12 Dec 2002 09:47:00 MST (news.easynews.com)

"O.C." wrote:

> Hi !
> What is faster in embedded SQL (in PRO-C):
> 1. One join of 5 large tables or
> 2. Splitt the this big SQL into 3-4 parts (and use the output of one sql
> result
> as bind variables for the next sql statement)
>
> Indexes are in use.
>
> Thank you !

One join of 5 tables is almost always going to be faster than splitting into
separate statements.

That said there are a huge number of variables related to the SQL, the data,
the tables, the indexes, the optimizer, etc. that affect SQL statements.

Rather than asking this question what you should do is run a test of two to
five different possible solutions using EXPLAIN PLAN in SQL*Plus. And, of
course, always use bind variables in any SQL.

Dan Morgan

