3592'::timestamp without time zone)
Heap Fetches: 0
Index Searches: 1
Buffers: shared hit=4
Planning:
Buffers: shared hit=30 read=10
Planning Time: 2.512 ms
Execution Time: 206.290 ms
(28 rows)
--
Regards,
Alena Rybakina
Postgres Professional
On 10.11.2024 23:16, Alena Rybakina wrote:
Hi!
On 10.11.2024 22:35, Ba Jinsheng wrote:
Hi all,
Please see this case:
Query 4 on TPC-DS benchmark:
with year_total as (
select c_customer_id customer_id
,c_first_name customer_first_name
,c_last_name customer_last_name
7;::text) AND (dyear =
2002))*
* Rows Removed by Filter: 372956*
Planning Time: 4.529 ms
Execution Time: 3024486.695 ms
(83 rows)
I have noticed significant underestimation here. In addition, these
nodes are executed noticeably slower in the plan, you can see it by the
current time in the explain.
Have you tried any tools to improve the cardinality yet, like aqo [0]?
[0] https://github.com/postgrespro/aqo
--
Regards,
Alena Rybakina
Postgres Professional