Hi Chaitanya,
you get the DDL of all tables using a SHOW before the SELECT and stats info is returned by "HELP STATS tablename".
According to explain there are CASTs on bi_id columns due to wrong datatypes:
SVC_PKG_T.GBL_SVC_DSPCH_FACT.ORIG_ORD_BU_ID (FLOAT, FORMAT
'-9.99999999999999E-999'))= 2.02000000000000E 003)
This results in higher CPU usage and stats are lost, you better rewrite using the correct datatype, which seems to be a varchar:
a.orig_ord_bu_id in ('7777','2020','5858','11','1435','4747','3232','7878','1415','707','9595','8585','3737', '3696')
Additionally there are some TRANSLATEs indicating different character sets (LATIN/UNICODE) on your join columns, which is a problem in your data model :-)
Dieter
Hi Chaitanya,
you get the DDL of all tables using a SHOW before the SELECT and stats info is returned by "HELP STATS tablename".
According to explain there are CASTs on bi_id columns due to wrong datatypes:
SVC_PKG_T.GBL_SVC_DSPCH_FACT.ORIG_ORD_BU_ID (FLOAT, FORMAT
'-9.99999999999999E-999'))= 2.02000000000000E 003)
This results in higher CPU usage and stats are lost, you better rewrite using the correct datatype, which seems to be a varchar:
a.orig_ord_bu_id in ('7777','2020','5858','11','1435','4747','3232','7878','1415','707','9595','8585','3737', '3696')
Additionally there are some TRANSLATEs indicating different character sets (LATIN/UNICODE) on your join columns, which is a problem in your data model :-)
Dieter