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)
         Subplans Removed: 5086

But when
Explain update table set .. where  partitionkey between  to_timestamp() and 
to_timestamp();
  It still show all of partitions with update ...

enable_partition_pruning keep defaut value 'on', It's expected ?  and we found 
for update sql with same where condition, it consumes huge memory than select.
Database version is Postgres 13.4 on RHEL8.4.


Thanks,

James

Reply via email to