Re: Partition pruning is not happening (even in PG18)

2025-10-18 Thread Lauro Ojeda
e "never executed" partitions should be deducted from the final cost estimation, which would make pruning to be the preferred option in this case. Are my assumptions correct? Is there anything I could do to influence the planner to dismiss the cost of "never executed" scans? Kin

Partition pruning is not happening (even in PG18)

2025-09-25 Thread Lauro Ojeda
ccounts_11 (cost=0.43..441501.86 rows=277377 width=12) (never executed) Index Cond: (transaction_date = t2.dt_col) -> Index Scan using accounts_p12_pkey on accounts_p12 accounts_12 (cost=0.43..434530.31 rows=272946 width=12) (never executed) Index Cond: (transaction_date = t2.dt_col) Planning Time: 1.147 ms Execution Time: 104040.968 ms (32 rows) Any help/explanation would be appreciated. Also, how could I contribute to get this partition pruning to work? Kindest regards, -- *Lauro Ojeda*