jiaqizho commented on issue #659: URL: https://github.com/apache/cloudberry/issues/659#issuecomment-2538949709
Hi , @aeschbacherEUF Would like try apply the https://github.com/apache/cloudberry/pull/776 ? ``` set optimizer to on; set optimizer_force_three_stage_scalar_dqa to on; set optimizer_force_multistage_agg to on; set optimizer_enable_use_distributetion_in_dqa to on; explain analyze select count(distinct a) from t_issue_659; ``` here is my output ``` postgres=# explain analyze select count(distinct a) from t_issue_659; QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------- Finalize Aggregate (cost=0.00..557.93 rows=1 width=8) (actual time=2048.025..2048.028 rows=1 loops=1) -> Gather Motion 1:1 (slice1; segments: 1) (cost=0.00..557.93 rows=1 width=8) (actual time=2047.832..2048.002 rows=1 loops=1) -> Partial Aggregate (cost=0.00..557.93 rows=1 width=8) (actual time=2045.865..2045.869 rows=1 loops=1) -> Seq Scan on t_issue_659 (cost=0.00..525.62 rows=4096000 width=4) (actual time=0.490..1074.208 rows=4096000 loops=1) Planning Time: 28.155 ms (slice0) Executor memory: 123K bytes. (slice1) Executor memory: 98306K bytes (seg0). Memory used: 128000kB Optimizer: Pivotal Optimizer (GPORCA) Execution Time: 2049.433 ms (10 rows) ``` ORCA will force use the 3-stage agg... -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
