Archives of the TeradataForum
Message Posted: Wed, 06 Apr 2005 @ 22:16:33 GMT
Try re-writing the query to the following:
select a.cal_date, b.txn_id, b.str_nbr, b.register_nbr, b.txn_type, b.txn_nbr from dim_time a inner join pos_txn b on a.per_id = b.per_id and a.cal_date between CAST('2005-04-03' AS DATE FORMAT 'YYYY-MM-DD') and CAST('2005-04-04' AS DATE FORMAT 'YYYY-MM-DD')
There is no need for the additional joins from what I can make out and this should at least give the optimiser a fighting chance to perform the partition elimination.
If this does not work could you post the explain plan.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|