Re: Question: Is it valid for a parent node's total cost to be lower than a child's total cost in EXPLAIN?

2025-07-19 Thread Tom Lane
"=?utf-8?B?WHVhbiBDaGVu?=" writes: > In some cases, I noticed that a parent path node's total cost is less than > that of one of its child path nodes. I initially expected that the total cost > of a node should be at least as large as the sum of its child nodes’ total > costs, or at least not s

Question: Is it valid for a parent node's total cost to be lower than a child's total cost in EXPLAIN?

2025-07-19 Thread Xuan Chen
Hi, I have a question regarding the interpretation of total cost in PostgreSQL's EXPLAIN output. In some cases, I noticed that a parent path node's total cost is less than that of one of its child path nodes. I initially expected that the total cost of a node should be at least as large as the