On 11/4/24 15:42, Ba Jinsheng wrote:
The estimated cost is reduced by 90%, and the execution time is reduced
by 68%. The second query plan includes the operation Memoize, while the
first query plan does not. I am wondering if we can optimize the logic
anywhere to enable the second query plan.
On 4/11/2024 15:23, Stepan Yankevych wrote:
Let's classify it as possible improvement / new feature for further
releases.
Optimizer definitely should be able to add that extra (redundant)
condition *and e.exec_date_id >= 20241021*
or even transform* e.exec_date_id >= co.create_date_id *
to
Please see this case:
TPC-H query 2:
select
s_acctbal,
s_name,
n_name,
p_partkey,
p_mfgr,
s_address,
s_phone,
s_comment
from
PART,
SUPPLIER,
PARTSUPP,
NATION,
REGION
where
p_partkey = ps_partkey
and s_suppkey = ps_suppkey
and p_size
Let's classify it as possible improvement / new feature for further releases.
Optimizer definitely should be able to add that extra (redundant) condition
and e.exec_date_id >= 20241021
or even transform e.exec_date_id >= co.create_date_id
to e.exec_date_id >= 20241021
Stepan Yanke