avamingli commented on issue #1251:
URL: https://github.com/apache/cloudberry/issues/1251#issuecomment-3116198055

   > explain(verbose) output:
   > QUERY PLAN
   > Gather Motion 36:1  (slice1; segments: 36)  (cost=0.00..431.00 rows=1 
width=32)
   > "  Output: country, ref_year, (count(*)), (count(DISTINCT ref_uid))"
   >   ->  GroupAggregate  (cost=0.00..431.00 rows=1 width=32)
   > "        Output: country, ref_year, count(*), count(DISTINCT ref_uid)"
   > "        Group Key: reference_info.country, reference_info.ref_year"
   >         ->  Sort  (cost=0.00..431.00 rows=1 width=24)
   > "              Output: country, ref_uid, ref_year"
   > "              Sort Key: reference_info.country, reference_info.ref_year"
   >               ->  Redistribute Motion 36:36  (slice2; segments: 36)  
(cost=0.00..431.00 rows=1 width=24)
   > "                    Output: country, ref_uid, ref_year"
   > "                    Hash Key: country, ref_year"
   >                     ->  Seq Scan on reference_info  (cost=0.00..431.00 
rows=1 width=24)
   > "                          Output: country, ref_uid, ref_year"
   > Optimizer: GPORCA
   > 
   > explain(verbose,analyze) output:
   > QUERY PLAN
   > Gather Motion 36:1  (slice1; segments: 36)  (cost=0.00..431.00 rows=1 
width=32) (actual time=72085.217..115653.745 rows=2480 loops=1)
   > "  Output: country, ref_year, (count(*)), (count(DISTINCT ref_uid))"
   >   ->  GroupAggregate  (cost=0.00..431.00 rows=1 width=32) (actual 
time=69972.797..88910.012 rows=92 loops=1)
   > "        Output: country, ref_year, count(*), count(DISTINCT ref_uid)"
   > "        Group Key: reference_info.country, reference_info.ref_year"
   >         ->  Sort  (cost=0.00..431.00 rows=1 width=24) (actual 
time=69832.795..71977.819 rows=8223755 loops=1)
   > "              Output: country, ref_uid, ref_year"
   > "              Sort Key: reference_info.country, reference_info.ref_year"
   >               Sort Method:  quicksort  Memory: 122481kB
   >   Max Memory: 62527kB  Avg Memory: 61240kB (2 segments)
   >               Sort Method:  external merge  Disk: 3588512kB
   >   Max Memory: 377088kB  Avg Memory: 105544kB (34 segments)
   >               work_mem: 2236160kB  Segments: 36  Max: 63854kB (segment 1)  
Workfile: (34 spilling)
   >               ->  Redistribute Motion 36:36  (slice2; segments: 36)  
(cost=0.00..431.00 rows=1 width=24) (actual time=3.000..66710.760 rows=8223755 
loops=1)
   > "                    Output: country, ref_uid, ref_year"
   > "                    Hash Key: country, ref_year"
   >                     ->  Seq Scan on reference_info  (cost=0.00..431.00 
rows=1 width=24) (actual time=5.000..2059.006 rows=2290316 loops=1)
   > "                          Output: country, ref_uid, ref_year"
   > Planning Time: 13.835 ms
   >   (slice0)    Executor memory: 117K bytes.
   > "  (slice1)    Executor memory: 106412K bytes avg x 36x(0) workers, 
141357K bytes max (seg23).  Work_mem: 63854K bytes max."
   > "  (slice2)    Executor memory: 530K bytes avg x 36x(0) workers, 530K 
bytes max (seg0)."
   > Memory used:  128000kB
   > Optimizer: GPORCA
   > Execution Time: 115751.813 ms
   > 
   > 
   > Both of them is worked
   
   Thanks! 
   
   @my-ship-it 


-- 
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: commits-unsubscr...@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cloudberry.apache.org
For additional commands, e-mail: commits-h...@cloudberry.apache.org

Reply via email to