Re: group by grouping set error in oracle 10g



On Jul 31, 3:22 pm, nickli <ningli2...@xxxxxxxxxxx> wrote:
Hi,

I had the error message"ORA-03001: unimplemented feature" when
running the following query in Oracle 10g:

SELECT /*+ USE_HASH(m,t) */
m.household_id
,t.channel_code
,m.trading_area
,SUM(t.quantity)
,case when grouping_id(-1)=0 then -1
when grouping_id(1)=0 then 1
when grouping_id(2)=0 then 2
when grouping_id(3)=0 then 3
else 99 end group_set_id
.......
FROM ( SELECT /*+ index(l) */
household_id
,min(segment_key) segment_key
,min(trading_area) trading_area
FROM promo_mailed_list partition(p3134) l
WHERE 1=1
GROUP BY household_id ) m
,transaction t
WHERE t.household_id = m.household_id
AND t.transaction_type = 1
AND t.sales_credit = 1
AND t.transaction_date BETWEEN '15-JUN-2007' AND '17-AUG-2007'
GROUP BY GROUPING SETS
((m.household_id,m.segment_key,t.channel_code,m.trading_area,t.transaction_­date,-1)
,(m.household_id,m.segment_key,m.trading_area,
1)
,(m.household_id,m.segment_key,t.channel_code,m.trading_area,2)
,
(m.household_id,m.segment_key,t.channel_code,m.trading_area,3))

It seems that Oracle 10g is complaining about the GROUP BY GROUPING
SETS statement.
The same statement runs well in 9i. Could anyone tell me a workaround
for this? I tried to set the following and it is not working:

alter session set "_gby_hash_aggregation_enabled" = FALSE;
alter session set optimizer_features_enable='9.2.0';

Thanks in advance.

Nick Li

What is the full version number of your '10g' database? Which options
were installed? What release and options for the '9i' database? I
suspect there are differences between the two installations you
haven't discovered or reported.


David Fitzjarrell

.



Relevant Pages

  • Re: Anleitung für Oracle Upgrdae?
    ... To upgrade Oracle databases from a previous release directly to Oracle9i ... For more information about upgrading a database, ... For RAC installations, ensure that there is at least 50 MB of free space ... SQL> SHOW PARAMETER PFILE; ...
    (de.comp.datenbanken.misc)
  • Re: Connecting to an Oracle database
    ... If you have SQL*PLUS (Oracle product) installed on your system you can use ... If you have only one database installed on your system, ... > with data from the cusotmers old programs when making installations. ... It is not possible to use Toad for reading large ...
    (borland.public.delphi.database.ado)
  • Re: Comparisons Oracle 11.1.0.7 to Oracle 10.2.0.4
    ... Until now the database underestimated always the benefits of indexes. ... In my tests until now it seems that Oracle 11 is predicting better without explicitly setting these parameters. ... Our problem is that with the same applications we have many small installations (one or two workplaces), where the database is on the pc of the user. ...
    (comp.databases.oracle.server)
  • Re: How much memory(RAM) required for OS running Oracle
    ... guidelines for future installations. ... OS and rest of memory for Database and for system with>16GB we ... Oracle installation and allocate remaining memory for Database (SGA + ...
    (comp.databases.oracle.server)
  • Re: Best way to updat TNSNames.ora in all servers
    ... We have many unix servers running Oracle ... database 9.2.0 enterprise edition. ... could justify for having many installations of Oracle 9.2.0.x would be ...
    (comp.databases.oracle.server)