Re: Outer Join and Group By

From: Mark Grand <mdg_at_netcom7.netcom.com>
Date: 1995/08/05
Message-ID: <MDG.95Aug5044353_at_netcom7.netcom.com>#1/1


In article <3vtg92$kuk_at_ixnews2.ix.netcom.com> jhas_at_ix.netcom.com (Swapan Jha ) writes:

   This solution won't use index if there is one index on Outer_month.    Try This

       select IN_NUMBER, IN_NAME, SUM(NVL(OUT_AMOUNT,0))
       from inner, outer
       where IN_NUMBER = OUT_NUMBER (+)
       and (OUTER_MONTH >= '9504'or OUT_MONTH IS NULL)
       group by IN_NUMBER, IN_NAME


If all of the indexed columns in a row are NULL, the row does not appear in an index. Your solution will not use an index unless OUT_MONTH is the first column in a multi-column index.

-- 
==============================
Mark Grand              Voicemail: 1-800-RAPID60
RSSI
Received on Sat Aug 05 1995 - 00:00:00 CEST

Original text of this message