Hi All,

I need some help for Materailized View. I have Mat view base for following Tables.

Fact Tables:
Invoice
Dimenstion Tables:
DBMASTER
PERIOD
ITEM_MASTER
CUSTOMER_MASTER

Code For Materailized View:
CREATE MATERIALIZED VIEW MV_INVOICE
enable query rewrite as
Select Invoice.DB_CODE,Invoice.CUST_SOLD_ID,Invoice.PERIO D,Invoice.ITEM_ID,
SUM(Invoice.QUANTITY * Invoice.UOM_CONV),
SUM(Invoice.NET_SALES * Invoice.EXRT_EURO * Invoice.EXRT_US),
SUM(Invoice.NET_SALES * Invoice.EXRT_EURO),
SUM(Invoice.NET_SALES * Invoice.EXRT_EURO * Invoice.EXRT_US)
FROM
Invoice,
CUSTOMER_MASTER,
DBMASTER,
PERIOD,
ITEM_MASTER
WHERE
Invoice.DB_CODE=DBMASTER.DB_CODE
AND Invoice.CUST_SOLD_ID=CUSTOMER_MASTER.CUST_ID
AND Invoice.PERIOD=PERIOD.PERIOD
AND ITEM_MASTER.ITEM_ID=Invoice.ITEM_ID
AND CUSTOMER_MASTER.TRD_INTRACO = 'TRADE'
GROUP BY
Invoice.DB_CODE,
Invoice.CUST_SOLD_ID,
Invoice.PERIOD,
Invoice.ITEM_ID


This materailized is used to rewrite many quries. This mat views is not been used by some quries where Fact table colums
are used i.e

Select INVOICE.ITEM_NAME,INVOICE.UOM...
.....................

The above query is not rewrite as Mat view has to join INVOICE table (big table) and cost is more for such joins.
Any ides how can i modify my Mat view to includes columns from fact table and it should not change the total number of rows.