|
Archives of the TeradataForumMessage Posted: Mon, 15 Jul 2002 @ 18:31:57 GMT
I'm sure others will notice more obscure things, but here are a few things that jump out at me. - A lot of the steps give their estimates with "low" or "no" confidence. You should probably collect statistics on all columns used in the WHERE clauses (and all indexes, of course). - Is the view LD_ACCESS_VIEWS.VSLB001_BILL identical to the underlying table? Step 4.1 gives its join condition as "BAN = (BAN (CHAR(10), CHARACTER SET LATIN, NOT CASESPECIFIC, FORMAT '---------9.')(CHAR(10), CHARACTER SET LATIN, NOT CASESPECIFIC, NAMED BAN ))", which strongly suggests that the view is converting BAN to char(10). That would be bad. - Do you have to select from VSLB001_BILL into a derived table? As far as I can see, that table could just be folded into a five-way join. With the proper statistics, the optimizer could then choose the best access plan. The five-way join would look something like this: SELECT FROM LD_ACCESS_VIEWS.VSLB001_BILL A, GROUP BY 1, 2, 3, 4, 16, 17, 18; --wgr
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||