| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: simple star transformation problem
bitmap_merge_area_size 1048576.
My main issue is the plan Oracle is using for this query. If I re-write
the query with this:
SELECT
D_PRODUCT.DEPARTMENT,
SUM(F_SALE_TRANSACTION.SALES_AMT),
D_DATE.MONTH
FROM
D_PRODUCT, F_SALE_TRANSACTION, D_DATE
HASH JOIN
INLIST ITERATOR TABLE ACCESS BY
INDEX ROWID D_DATE
INDEX RANGE SCAN PK_DATE
PARTITION RANGE INLIST
TABLE ACCESS FULL F_SALE_TRANSACTION
TABLE ACCESS FULL D_PRODUCT
which looks a lot better (no nested loops etc) and execution time drops
to <50 seconds. I'll now be collecting histograms (a.k.a. column level
stats) because it seems that Oracle doesn't know how many rows the
BETWEEN statement returns but it works correctly when I replace it with
an IN LIST statement. I am not keen on histograms as it is not a very
stable piece but I'll give it a try. Again any feedback/suggestions
please let me know.
Thanks,
Daniel
Received on Fri Jul 15 2005 - 17:32:32 CDT
![]() |
![]() |