Archives of the TeradataForum
Message Posted: Mon, 22 May 2006 @ 17:49:14 GMT
Subj: | | Re: Optimize query plan for 5-table join |
|
From: | | Henry Runn |
Hi,
You have to check the definition of the view. You may have made an alias to base table and you are using both alias and base tables columns in
your view and no join condition between the base tables and alias.
In the last explain you can see that it reads 10 tables
We do an all-AMPs RETRIEVE step from MHPSMD.ORD
We do an all-AMPs RETRIEVE step from MHPSMD.SLS
We do an all-AMPs RETRIEVE step from MHPSMD.MKDN
We do an all-AMPs RETRIEVE step from MHPSMD.RCPT
We do an all-AMPs RETRIEVE step from MHPSMD.STK
2) We do an all-AMPs RETRIEVE step from
MHPSMD.SALES_DIVN_LOC_CDV_WK
3) We do an all-AMPs RETRIEVE step from
MHPSMD.ON_ORDER_DIVN_LOC_CDV_WK
4) We do an all-AMPs RETRIEVE step from
MHPSMD.STK_DIVN_LOC_CDV_WK
5) We do an all-AMPs RETRIEVE step from
MHPSMD.MARKDOWN_DIVN_LOC_CDV_WK
do an all-AMPs RETRIEVE step from
MHPSMD.RCPT_DIVN_LOC_CDV_WK
rgds Henry
|