Unanswered: Matarialized Views
I need some help for Materailized View. I have Mat view base for following Tables.
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)
AND CUSTOMER_MASTER.TRD_INTRACO = 'TRADE'
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
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.
(No need to search web before posting new question)