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: Group by: Not getting expected output

Re: Group by: Not getting expected output

From: <mjbox01_at_gmail.com>
Date: 13 May 2006 12:48:48 -0700
Message-ID: <1147549728.417098.274990@g10g2000cwb.googlegroups.com>


Carlos wrote:
> OK. But your solution works for this particular case. Mine works with
> every select criteria.

Your solution works only with joins. When you don't have one you add it needlessly. Decode or case can be extended to find counts for all ranges, not just a single range, and many other criteria. When using joins you can still use decode or case. So it works for more than this particular case.

> 'Efficiently' can be vague without knowing the
> details (Indexes, data size & distribution, etc...).

And in this case it is also more efficient as it reads the table once, instead of twice, which is more efficient regardless of how the table is read or how big it is. Doing something once, instead of twice is not a vague definition of efficiency. Received on Sat May 13 2006 - 14:48:48 CDT

Original text of this message

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