BrianTyler
IS-IT--Management
DB2 v8 on AIX
Table A contains CUSTNO, which is indexed as Unique
Table B contains ORDNO and CUSTNO , both indexed seperately with ORDNO being unique,and CUSTNO being a foreign key
Table C contains ORDNO, CUSTNO and ITEMNO each indexed seperately, with ITEMNO being unique, and CUSTNO and ORDNO being foreign keys.
When joining these three tables, the minimum joins are A.CUSTNO to B.CUSTNO, then B.ORDNO to C.ORDNO.
If any of you have experimented in this area, please share your results.
Thanks
brian
Is there likely to be any benefit in adding further joins such as B.CUSTNO to C.CUSTNO; A.CUSTNO to C.CUSTNO.
I am unsure whether the optimizer would prefer to have these extra joins specified or would it confuse matters and actually slow the query down.
Table A contains CUSTNO, which is indexed as Unique
Table B contains ORDNO and CUSTNO , both indexed seperately with ORDNO being unique,and CUSTNO being a foreign key
Table C contains ORDNO, CUSTNO and ITEMNO each indexed seperately, with ITEMNO being unique, and CUSTNO and ORDNO being foreign keys.
When joining these three tables, the minimum joins are A.CUSTNO to B.CUSTNO, then B.ORDNO to C.ORDNO.
If any of you have experimented in this area, please share your results.
Thanks
brian
Is there likely to be any benefit in adding further joins such as B.CUSTNO to C.CUSTNO; A.CUSTNO to C.CUSTNO.
I am unsure whether the optimizer would prefer to have these extra joins specified or would it confuse matters and actually slow the query down.