Hi,
We have a table have range partition (about 5K partitions) , when
Explain select count(*) from table where partitionkey between to_timestamp()
and to_timestamp();
It show
Aggregate (cost=15594.72..15594.73 rows=1 width=8)
-> Append (cost=0.15..15582.00 rows=5088 width=0)
Sub
"James Pang (chaolpan)" writes:
> But when
> Explain update table set .. where partitionkey between to_timestamp() and
> to_timestamp();
> It still show all of partitions with update ...
In releases before v14, partition pruning is far stupider for UPDATE
(and DELETE) than it is for SELECT.
For release v14, optimizer can handle large partition counts query ( select
,update ,delete) and partition pruning is similar as SELECT, right? We will
check option to upgrade to v14.
Thanks,
James
-Original Message-
From: Tom Lane
Sent: Tuesday, June 28, 2022 9:30 PM
To: James Pang