

======================================================================
 QUERY FILE: 5 (5.sql)
 TIMESTAMP:  Mon Dec 15 19:09:48 CST 2025
======================================================================

--- [ CONFIG: dp ] ----------------------------------------
Limit  (cost=256286.56..256286.56 rows=1 width=58) (actual time=785.214..785.217 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=256286.56..256286.62 rows=25 width=58) (actual time=785.213..785.216 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=256193.65..256286.43 rows=25 width=58) (actual time=784.208..785.207 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=256193.65..256212.14 rows=7398 width=38) (actual time=783.953..784.119 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Hash Join  (cost=57338.69..255718.22 rows=7398 width=38) (actual time=150.350..782.674 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
                          Buffers: shared hit=142499
                          ->  Hash Join  (cost=56865.69..253784.33 rows=184921 width=50) (actual time=148.856..760.580 rows=180828.00 loops=1)
                                Output: customer.c_nationkey, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey, nation.n_name, nation.n_nationkey
                                Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
                                Buffers: shared hit=142276
                                ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.007..236.527 rows=6001215.00 loops=1)
                                      Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                      Buffers: shared hit=112555
                                ->  Hash  (cost=56287.92..56287.92 rows=46222 width=38) (actual time=148.770..148.772 rows=45096.00 loops=1)
                                      Output: customer.c_nationkey, orders.o_orderkey, nation.n_name, nation.n_nationkey
                                      Buckets: 65536  Batches: 1  Memory Usage: 3683kB
                                      Buffers: shared hit=29721
                                      ->  Hash Join  (cost=6334.03..56287.92 rows=46222 width=38) (actual time=19.358..143.041 rows=45096.00 loops=1)
                                            Output: customer.c_nationkey, orders.o_orderkey, nation.n_name, nation.n_nationkey
                                            Hash Cond: (orders.o_custkey = customer.c_custkey)
                                            Buffers: shared hit=29721
                                            ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.009..98.260 rows=227783.00 loops=1)
                                                  Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
                                                  Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                                  Rows Removed by Filter: 1272217
                                                  Buffers: shared hit=26125
                                            ->  Hash  (cost=5959.03..5959.03 rows=30000 width=38) (actual time=19.318..19.320 rows=29904.00 loops=1)
                                                  Output: customer.c_custkey, customer.c_nationkey, nation.n_name, nation.n_nationkey
                                                  Buckets: 32768  Batches: 1  Memory Usage: 2359kB
                                                  Buffers: shared hit=3596
                                                  ->  Hash Join  (cost=2.53..5959.03 rows=30000 width=38) (actual time=0.027..16.876 rows=29904.00 loops=1)
                                                        Output: customer.c_custkey, customer.c_nationkey, nation.n_name, nation.n_nationkey
                                                        Hash Cond: (customer.c_nationkey = nation.n_nationkey)
                                                        Buffers: shared hit=3596
                                                        ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.003..6.753 rows=150000.00 loops=1)
                                                              Output: customer.c_custkey, customer.c_name, customer.c_address, customer.c_nationkey, customer.c_phone, customer.c_acctbal, customer.c_mktsegment, customer.c_comment
                                                              Buffers: shared hit=3594
                                                        ->  Hash  (cost=2.47..2.47 rows=5 width=30) (actual time=0.020..0.021 rows=5.00 loops=1)
                                                              Output: nation.n_name, nation.n_nationkey
                                                              Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                              Buffers: shared hit=2
                                                              ->  Hash Join  (cost=1.07..2.47 rows=5 width=30) (actual time=0.016..0.018 rows=5.00 loops=1)
                                                                    Output: nation.n_name, nation.n_nationkey
                                                                    Hash Cond: (nation.n_regionkey = region.r_regionkey)
                                                                    Buffers: shared hit=2
                                                                    ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.001..0.002 rows=25.00 loops=1)
                                                                          Output: nation.n_nationkey, nation.n_name, nation.n_regionkey, nation.n_comment
                                                                          Buffers: shared hit=1
                                                                    ->  Hash  (cost=1.06..1.06 rows=1 width=4) (actual time=0.009..0.009 rows=1.00 loops=1)
                                                                          Output: region.r_regionkey
                                                                          Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                                          Buffers: shared hit=1
                                                                          ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.007..0.008 rows=1.00 loops=1)
                                                                                Output: region.r_regionkey
                                                                                Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                                                                Rows Removed by Filter: 4
                                                                                Buffers: shared hit=1
                          ->  Hash  (cost=323.00..323.00 rows=10000 width=8) (actual time=1.392..1.392 rows=10000.00 loops=1)
                                Output: supplier.s_suppkey, supplier.s_nationkey
                                Buckets: 16384  Batches: 1  Memory Usage: 519kB
                                Buffers: shared hit=223
                                ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.010..0.864 rows=10000.00 loops=1)
                                      Output: supplier.s_suppkey, supplier.s_nationkey
                                      Buffers: shared hit=223
Planning:
  Buffers: shared hit=248
Planning Time: 0.798 ms
Execution Time: 785.582 ms

--- [ CONFIG: goo_rows ] ----------------------------------------
Limit  (cost=273966.06..273966.06 rows=1 width=58) (actual time=1065.322..1065.325 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=273966.06..273966.12 rows=25 width=58) (actual time=1065.321..1065.324 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=273873.15..273965.93 rows=25 width=58) (actual time=1064.345..1065.315 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=273873.15..273891.64 rows=7398 width=38) (actual time=1064.080..1064.240 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Hash Join  (cost=62073.69..273397.72 rows=7398 width=38) (actual time=217.781..1062.460 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
                          Buffers: shared hit=142499
                          ->  Hash Join  (cost=61660.66..265976.16 rows=924606 width=20) (actual time=216.244..1006.755 rows=910019.00 loops=1)
                                Output: lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey, customer.c_nationkey
                                Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
                                Buffers: shared hit=142274
                                ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.006..237.445 rows=6001215.00 loops=1)
                                      Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                      Buffers: shared hit=112555
                                ->  Hash  (cost=58771.78..58771.78 rows=231111 width=8) (actual time=216.047..216.048 rows=227783.00 loops=1)
                                      Output: customer.c_nationkey, orders.o_orderkey
                                      Buckets: 262144  Batches: 1  Memory Usage: 10946kB
                                      Buffers: shared hit=29719
                                      ->  Hash Join  (cost=6969.00..58771.78 rows=231111 width=8) (actual time=21.541..187.664 rows=227783.00 loops=1)
                                            Output: customer.c_nationkey, orders.o_orderkey
                                            Hash Cond: (orders.o_custkey = customer.c_custkey)
                                            Buffers: shared hit=29719
                                            ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.006..101.816 rows=227783.00 loops=1)
                                                  Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
                                                  Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                                  Rows Removed by Filter: 1272217
                                                  Buffers: shared hit=26125
                                            ->  Hash  (cost=5094.00..5094.00 rows=150000 width=8) (actual time=21.368..21.369 rows=150000.00 loops=1)
                                                  Output: customer.c_custkey, customer.c_nationkey
                                                  Buckets: 262144  Batches: 1  Memory Usage: 7908kB
                                                  Buffers: shared hit=3594
                                                  ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.003..12.089 rows=150000.00 loops=1)
                                                        Output: customer.c_custkey, customer.c_nationkey
                                                        Buffers: shared hit=3594
                          ->  Hash  (cost=383.03..383.03 rows=2000 width=38) (actual time=1.369..1.370 rows=2019.00 loops=1)
                                Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                Buckets: 2048  Batches: 1  Memory Usage: 158kB
                                Buffers: shared hit=225
                                ->  Hash Join  (cost=2.53..383.03 rows=2000 width=38) (actual time=0.036..1.218 rows=2019.00 loops=1)
                                      Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                      Hash Cond: (supplier.s_nationkey = nation.n_nationkey)
                                      Buffers: shared hit=225
                                      ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.010..0.584 rows=10000.00 loops=1)
                                            Output: supplier.s_suppkey, supplier.s_name, supplier.s_address, supplier.s_nationkey, supplier.s_phone, supplier.s_acctbal, supplier.s_comment
                                            Buffers: shared hit=223
                                      ->  Hash  (cost=2.47..2.47 rows=5 width=30) (actual time=0.022..0.023 rows=5.00 loops=1)
                                            Output: nation.n_name, nation.n_nationkey
                                            Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                            Buffers: shared hit=2
                                            ->  Hash Join  (cost=1.07..2.47 rows=5 width=30) (actual time=0.019..0.021 rows=5.00 loops=1)
                                                  Output: nation.n_name, nation.n_nationkey
                                                  Hash Cond: (nation.n_regionkey = region.r_regionkey)
                                                  Buffers: shared hit=2
                                                  ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.003..0.004 rows=25.00 loops=1)
                                                        Output: nation.n_nationkey, nation.n_name, nation.n_regionkey, nation.n_comment
                                                        Buffers: shared hit=1
                                                  ->  Hash  (cost=1.06..1.06 rows=1 width=4) (actual time=0.009..0.010 rows=1.00 loops=1)
                                                        Output: region.r_regionkey
                                                        Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                        Buffers: shared hit=1
                                                        ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.006..0.007 rows=1.00 loops=1)
                                                              Output: region.r_regionkey
                                                              Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                                              Rows Removed by Filter: 4
                                                              Buffers: shared hit=1
Planning:
  Buffers: shared hit=248
Planning Time: 0.469 ms
Execution Time: 1065.703 ms

--- [ CONFIG: goo_selectivity ] ----------------------------------------
Limit  (cost=284831.15..284831.16 rows=1 width=58) (actual time=1179.799..1179.802 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=284831.15..284831.22 rows=25 width=58) (actual time=1179.798..1179.801 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=284738.24..284831.03 rows=25 width=58) (actual time=1178.814..1179.792 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=284738.24..284756.74 rows=7398 width=38) (actual time=1178.560..1178.723 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Nested Loop  (cost=58957.45..284262.81 rows=7398 width=38) (actual time=140.727..1176.998 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Join Filter: (nation.n_regionkey = region.r_regionkey)
                          Rows Removed by Join Filter: 29063
                          Buffers: shared hit=142499
                          ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.007..0.008 rows=1.00 loops=1)
                                Output: region.r_regionkey, region.r_name, region.r_comment
                                Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                Rows Removed by Filter: 4
                                Buffers: shared hit=1
                          ->  Hash Join  (cost=58957.45..283799.36 rows=36991 width=42) (actual time=140.627..1175.528 rows=36482.00 loops=1)
                                Output: nation.n_name, nation.n_regionkey, lineitem.l_extendedprice, lineitem.l_discount
                                Hash Cond: (customer.c_nationkey = nation.n_nationkey)
                                Buffers: shared hit=142498
                                ->  Hash Join  (cost=58955.89..283289.17 rows=36991 width=20) (actual time=140.614..1171.574 rows=36482.00 loops=1)
                                      Output: supplier.s_nationkey, customer.c_nationkey, lineitem.l_extendedprice, lineitem.l_discount
                                      Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
                                      Buffers: shared hit=142497
                                      ->  Hash Join  (cost=58482.89..275511.72 rows=924606 width=20) (actual time=139.109..1096.437 rows=910019.00 loops=1)
                                            Output: customer.c_nationkey, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey
                                            Hash Cond: (orders.o_custkey = customer.c_custkey)
                                            Buffers: shared hit=142274
                                            ->  Hash Join  (cost=51513.89..255829.39 rows=924606 width=20) (actual time=117.557..932.339 rows=910019.00 loops=1)
                                                  Output: orders.o_custkey, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey
                                                  Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
                                                  Buffers: shared hit=138680
                                                  ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.015..241.570 rows=6001215.00 loops=1)
                                                        Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                                        Buffers: shared hit=112555
                                                  ->  Hash  (cost=48625.00..48625.00 rows=231111 width=8) (actual time=117.357..117.357 rows=227783.00 loops=1)
                                                        Output: orders.o_custkey, orders.o_orderkey
                                                        Buckets: 262144  Batches: 1  Memory Usage: 10946kB
                                                        Buffers: shared hit=26125
                                                        ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.009..97.703 rows=227783.00 loops=1)
                                                              Output: orders.o_custkey, orders.o_orderkey
                                                              Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                                              Rows Removed by Filter: 1272217
                                                              Buffers: shared hit=26125
                                            ->  Hash  (cost=5094.00..5094.00 rows=150000 width=8) (actual time=21.371..21.371 rows=150000.00 loops=1)
                                                  Output: customer.c_custkey, customer.c_nationkey
                                                  Buckets: 262144  Batches: 1  Memory Usage: 7908kB
                                                  Buffers: shared hit=3594
                                                  ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.004..12.125 rows=150000.00 loops=1)
                                                        Output: customer.c_custkey, customer.c_nationkey
                                                        Buffers: shared hit=3594
                                      ->  Hash  (cost=323.00..323.00 rows=10000 width=8) (actual time=1.386..1.387 rows=10000.00 loops=1)
                                            Output: supplier.s_suppkey, supplier.s_nationkey
                                            Buckets: 16384  Batches: 1  Memory Usage: 519kB
                                            Buffers: shared hit=223
                                            ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.009..0.867 rows=10000.00 loops=1)
                                                  Output: supplier.s_suppkey, supplier.s_nationkey
                                                  Buffers: shared hit=223
                                ->  Hash  (cost=1.25..1.25 rows=25 width=34) (actual time=0.009..0.009 rows=25.00 loops=1)
                                      Output: nation.n_name, nation.n_nationkey, nation.n_regionkey
                                      Buckets: 1024  Batches: 1  Memory Usage: 10kB
                                      Buffers: shared hit=1
                                      ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.004..0.005 rows=25.00 loops=1)
                                            Output: nation.n_name, nation.n_nationkey, nation.n_regionkey
                                            Buffers: shared hit=1
Planning:
  Buffers: shared hit=248
Planning Time: 0.456 ms
Execution Time: 1180.528 ms

--- [ CONFIG: goo_result_size ] ----------------------------------------
Limit  (cost=273966.06..273966.06 rows=1 width=58) (actual time=1043.509..1043.512 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=273966.06..273966.12 rows=25 width=58) (actual time=1043.508..1043.512 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=273873.15..273965.93 rows=25 width=58) (actual time=1042.521..1043.500 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=273873.15..273891.64 rows=7398 width=38) (actual time=1042.257..1042.416 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Hash Join  (cost=62073.69..273397.72 rows=7398 width=38) (actual time=215.505..1040.772 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
                          Buffers: shared hit=142499
                          ->  Hash Join  (cost=61660.66..265976.16 rows=924606 width=20) (actual time=213.962..986.121 rows=910019.00 loops=1)
                                Output: lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey, customer.c_nationkey
                                Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
                                Buffers: shared hit=142274
                                ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.007..235.892 rows=6001215.00 loops=1)
                                      Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                      Buffers: shared hit=112555
                                ->  Hash  (cost=58771.78..58771.78 rows=231111 width=8) (actual time=213.777..213.779 rows=227783.00 loops=1)
                                      Output: customer.c_nationkey, orders.o_orderkey
                                      Buckets: 262144  Batches: 1  Memory Usage: 10946kB
                                      Buffers: shared hit=29719
                                      ->  Hash Join  (cost=6969.00..58771.78 rows=231111 width=8) (actual time=23.207..185.656 rows=227783.00 loops=1)
                                            Output: customer.c_nationkey, orders.o_orderkey
                                            Hash Cond: (orders.o_custkey = customer.c_custkey)
                                            Buffers: shared hit=29719
                                            ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.005..99.589 rows=227783.00 loops=1)
                                                  Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
                                                  Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                                  Rows Removed by Filter: 1272217
                                                  Buffers: shared hit=26125
                                            ->  Hash  (cost=5094.00..5094.00 rows=150000 width=8) (actual time=23.028..23.028 rows=150000.00 loops=1)
                                                  Output: customer.c_custkey, customer.c_nationkey
                                                  Buckets: 262144  Batches: 1  Memory Usage: 7908kB
                                                  Buffers: shared hit=3594
                                                  ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.004..12.380 rows=150000.00 loops=1)
                                                        Output: customer.c_custkey, customer.c_nationkey
                                                        Buffers: shared hit=3594
                          ->  Hash  (cost=383.03..383.03 rows=2000 width=38) (actual time=1.385..1.386 rows=2019.00 loops=1)
                                Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                Buckets: 2048  Batches: 1  Memory Usage: 158kB
                                Buffers: shared hit=225
                                ->  Hash Join  (cost=2.53..383.03 rows=2000 width=38) (actual time=0.038..1.229 rows=2019.00 loops=1)
                                      Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                      Hash Cond: (supplier.s_nationkey = nation.n_nationkey)
                                      Buffers: shared hit=225
                                      ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.011..0.592 rows=10000.00 loops=1)
                                            Output: supplier.s_suppkey, supplier.s_name, supplier.s_address, supplier.s_nationkey, supplier.s_phone, supplier.s_acctbal, supplier.s_comment
                                            Buffers: shared hit=223
                                      ->  Hash  (cost=2.47..2.47 rows=5 width=30) (actual time=0.023..0.023 rows=5.00 loops=1)
                                            Output: nation.n_name, nation.n_nationkey
                                            Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                            Buffers: shared hit=2
                                            ->  Hash Join  (cost=1.07..2.47 rows=5 width=30) (actual time=0.019..0.022 rows=5.00 loops=1)
                                                  Output: nation.n_name, nation.n_nationkey
                                                  Hash Cond: (nation.n_regionkey = region.r_regionkey)
                                                  Buffers: shared hit=2
                                                  ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.004..0.004 rows=25.00 loops=1)
                                                        Output: nation.n_nationkey, nation.n_name, nation.n_regionkey, nation.n_comment
                                                        Buffers: shared hit=1
                                                  ->  Hash  (cost=1.06..1.06 rows=1 width=4) (actual time=0.010..0.010 rows=1.00 loops=1)
                                                        Output: region.r_regionkey
                                                        Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                        Buffers: shared hit=1
                                                        ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.006..0.007 rows=1.00 loops=1)
                                                              Output: region.r_regionkey
                                                              Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                                              Rows Removed by Filter: 4
                                                              Buffers: shared hit=1
Planning:
  Buffers: shared hit=248
Planning Time: 0.504 ms
Execution Time: 1044.246 ms

--- [ CONFIG: goo_cost ] ----------------------------------------
Limit  (cost=279361.91..279361.91 rows=1 width=58) (actual time=1115.926..1115.933 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=279361.91..279361.97 rows=25 width=58) (actual time=1115.926..1115.932 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=279268.99..279361.78 rows=25 width=58) (actual time=1114.926..1115.921 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=279268.99..279287.49 rows=7398 width=38) (actual time=1114.671..1114.837 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Hash Join  (cost=62646.47..278793.57 rows=7398 width=38) (actual time=202.603..1113.287 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Hash Cond: ((lineitem.l_orderkey = orders.o_orderkey) AND (supplier.s_nationkey = customer.c_nationkey))
                          Buffers: shared hit=142499
                          ->  Hash Join  (cost=408.03..207479.57 rows=1200210 width=50) (actual time=1.354..681.908 rows=1212335.00 loops=1)
                                Output: lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_orderkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                Hash Cond: (lineitem.l_suppkey = supplier.s_suppkey)
                                Buffers: shared hit=112780
                                ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.008..237.951 rows=6001215.00 loops=1)
                                      Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                      Buffers: shared hit=112555
                                ->  Hash  (cost=383.03..383.03 rows=2000 width=38) (actual time=1.342..1.345 rows=2019.00 loops=1)
                                      Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                      Buckets: 2048  Batches: 1  Memory Usage: 158kB
                                      Buffers: shared hit=225
                                      ->  Hash Join  (cost=2.53..383.03 rows=2000 width=38) (actual time=0.038..1.205 rows=2019.00 loops=1)
                                            Output: supplier.s_suppkey, supplier.s_nationkey, nation.n_name, nation.n_nationkey
                                            Hash Cond: (supplier.s_nationkey = nation.n_nationkey)
                                            Buffers: shared hit=225
                                            ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.008..0.584 rows=10000.00 loops=1)
                                                  Output: supplier.s_suppkey, supplier.s_name, supplier.s_address, supplier.s_nationkey, supplier.s_phone, supplier.s_acctbal, supplier.s_comment
                                                  Buffers: shared hit=223
                                            ->  Hash  (cost=2.47..2.47 rows=5 width=30) (actual time=0.026..0.029 rows=5.00 loops=1)
                                                  Output: nation.n_name, nation.n_nationkey
                                                  Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                  Buffers: shared hit=2
                                                  ->  Hash Join  (cost=1.07..2.47 rows=5 width=30) (actual time=0.023..0.027 rows=5.00 loops=1)
                                                        Output: nation.n_name, nation.n_nationkey
                                                        Hash Cond: (nation.n_regionkey = region.r_regionkey)
                                                        Buffers: shared hit=2
                                                        ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.004..0.005 rows=25.00 loops=1)
                                                              Output: nation.n_nationkey, nation.n_name, nation.n_regionkey, nation.n_comment
                                                              Buffers: shared hit=1
                                                        ->  Hash  (cost=1.06..1.06 rows=1 width=4) (actual time=0.011..0.012 rows=1.00 loops=1)
                                                              Output: region.r_regionkey
                                                              Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                              Buffers: shared hit=1
                                                              ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.009..0.009 rows=1.00 loops=1)
                                                                    Output: region.r_regionkey
                                                                    Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                                                    Rows Removed by Filter: 4
                                                                    Buffers: shared hit=1
                          ->  Hash  (cost=58771.78..58771.78 rows=231111 width=8) (actual time=200.861..200.861 rows=227783.00 loops=1)
                                Output: customer.c_nationkey, orders.o_orderkey
                                Buckets: 262144  Batches: 1  Memory Usage: 10946kB
                                Buffers: shared hit=29719
                                ->  Hash Join  (cost=6969.00..58771.78 rows=231111 width=8) (actual time=21.507..175.340 rows=227783.00 loops=1)
                                      Output: customer.c_nationkey, orders.o_orderkey
                                      Hash Cond: (orders.o_custkey = customer.c_custkey)
                                      Buffers: shared hit=29719
                                      ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.006..97.916 rows=227783.00 loops=1)
                                            Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
                                            Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                            Rows Removed by Filter: 1272217
                                            Buffers: shared hit=26125
                                      ->  Hash  (cost=5094.00..5094.00 rows=150000 width=8) (actual time=21.333..21.334 rows=150000.00 loops=1)
                                            Output: customer.c_custkey, customer.c_nationkey
                                            Buckets: 262144  Batches: 1  Memory Usage: 7908kB
                                            Buffers: shared hit=3594
                                            ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.004..12.051 rows=150000.00 loops=1)
                                                  Output: customer.c_custkey, customer.c_nationkey
                                                  Buffers: shared hit=3594
Planning:
  Buffers: shared hit=248
Planning Time: 0.457 ms
Execution Time: 1116.183 ms

--- [ CONFIG: geqo ] ----------------------------------------
Limit  (cost=256286.55..256286.55 rows=1 width=58) (actual time=773.873..773.876 rows=1.00 loops=1)
  Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
  Buffers: shared hit=142505
  ->  Sort  (cost=256286.55..256286.61 rows=25 width=58) (actual time=773.872..773.875 rows=1.00 loops=1)
        Output: nation.n_name, (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount))))
        Sort Key: (sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))) DESC
        Sort Method: top-N heapsort  Memory: 25kB
        Buffers: shared hit=142505
        ->  GroupAggregate  (cost=256193.64..256286.43 rows=25 width=58) (actual time=772.913..773.867 rows=5.00 loops=1)
              Output: nation.n_name, sum((lineitem.l_extendedprice * ('1'::numeric - lineitem.l_discount)))
              Group Key: nation.n_name
              Buffers: shared hit=142502
              ->  Sort  (cost=256193.64..256212.13 rows=7398 width=38) (actual time=772.665..772.821 rows=7419.00 loops=1)
                    Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                    Sort Key: nation.n_name
                    Sort Method: quicksort  Memory: 598kB
                    Buffers: shared hit=142502
                    ->  Hash Join  (cost=57338.69..255718.21 rows=7398 width=38) (actual time=144.328..771.326 rows=7419.00 loops=1)
                          Output: nation.n_name, lineitem.l_extendedprice, lineitem.l_discount
                          Hash Cond: ((lineitem.l_suppkey = supplier.s_suppkey) AND (customer.c_nationkey = supplier.s_nationkey))
                          Buffers: shared hit=142499
                          ->  Hash Join  (cost=56865.69..253784.33 rows=184920 width=50) (actual time=142.849..749.570 rows=180828.00 loops=1)
                                Output: lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_suppkey, nation.n_name, nation.n_nationkey, customer.c_nationkey
                                Hash Cond: (lineitem.l_orderkey = orders.o_orderkey)
                                Buffers: shared hit=142276
                                ->  Seq Scan on public.lineitem  (cost=0.00..172565.50 rows=6001050 width=20) (actual time=0.006..235.455 rows=6001215.00 loops=1)
                                      Output: lineitem.l_orderkey, lineitem.l_partkey, lineitem.l_suppkey, lineitem.l_linenumber, lineitem.l_quantity, lineitem.l_extendedprice, lineitem.l_discount, lineitem.l_tax, lineitem.l_returnflag, lineitem.l_linestatus, lineitem.l_shipdate, lineitem.l_commitdate, lineitem.l_receiptdate, lineitem.l_shipinstruct, lineitem.l_shipmode, lineitem.l_comment
                                      Buffers: shared hit=112555
                                ->  Hash  (cost=56287.92..56287.92 rows=46222 width=38) (actual time=142.734..142.737 rows=45096.00 loops=1)
                                      Output: nation.n_name, nation.n_nationkey, customer.c_nationkey, orders.o_orderkey
                                      Buckets: 65536  Batches: 1  Memory Usage: 3683kB
                                      Buffers: shared hit=29721
                                      ->  Hash Join  (cost=6334.03..56287.92 rows=46222 width=38) (actual time=18.598..137.262 rows=45096.00 loops=1)
                                            Output: nation.n_name, nation.n_nationkey, customer.c_nationkey, orders.o_orderkey
                                            Hash Cond: (orders.o_custkey = customer.c_custkey)
                                            Buffers: shared hit=29721
                                            ->  Seq Scan on public.orders  (cost=0.00..48625.00 rows=231111 width=8) (actual time=0.007..95.597 rows=227783.00 loops=1)
                                                  Output: orders.o_orderkey, orders.o_custkey, orders.o_orderstatus, orders.o_totalprice, orders.o_orderdate, orders.o_orderpriority, orders.o_clerk, orders.o_shippriority, orders.o_comment
                                                  Filter: ((orders.o_orderdate >= '1997-01-01'::date) AND (orders.o_orderdate < '1998-01-01 00:00:00'::timestamp without time zone))
                                                  Rows Removed by Filter: 1272217
                                                  Buffers: shared hit=26125
                                            ->  Hash  (cost=5959.03..5959.03 rows=30000 width=38) (actual time=18.564..18.565 rows=29904.00 loops=1)
                                                  Output: nation.n_name, nation.n_nationkey, customer.c_custkey, customer.c_nationkey
                                                  Buckets: 32768  Batches: 1  Memory Usage: 2359kB
                                                  Buffers: shared hit=3596
                                                  ->  Hash Join  (cost=2.53..5959.03 rows=30000 width=38) (actual time=0.026..16.364 rows=29904.00 loops=1)
                                                        Output: nation.n_name, nation.n_nationkey, customer.c_custkey, customer.c_nationkey
                                                        Hash Cond: (customer.c_nationkey = nation.n_nationkey)
                                                        Buffers: shared hit=3596
                                                        ->  Seq Scan on public.customer  (cost=0.00..5094.00 rows=150000 width=8) (actual time=0.004..6.549 rows=150000.00 loops=1)
                                                              Output: customer.c_custkey, customer.c_name, customer.c_address, customer.c_nationkey, customer.c_phone, customer.c_acctbal, customer.c_mktsegment, customer.c_comment
                                                              Buffers: shared hit=3594
                                                        ->  Hash  (cost=2.47..2.47 rows=5 width=30) (actual time=0.019..0.020 rows=5.00 loops=1)
                                                              Output: nation.n_name, nation.n_nationkey
                                                              Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                              Buffers: shared hit=2
                                                              ->  Hash Join  (cost=1.07..2.47 rows=5 width=30) (actual time=0.016..0.018 rows=5.00 loops=1)
                                                                    Output: nation.n_name, nation.n_nationkey
                                                                    Hash Cond: (nation.n_regionkey = region.r_regionkey)
                                                                    Buffers: shared hit=2
                                                                    ->  Seq Scan on public.nation  (cost=0.00..1.25 rows=25 width=34) (actual time=0.001..0.002 rows=25.00 loops=1)
                                                                          Output: nation.n_nationkey, nation.n_name, nation.n_regionkey, nation.n_comment
                                                                          Buffers: shared hit=1
                                                                    ->  Hash  (cost=1.06..1.06 rows=1 width=4) (actual time=0.009..0.009 rows=1.00 loops=1)
                                                                          Output: region.r_regionkey
                                                                          Buckets: 1024  Batches: 1  Memory Usage: 9kB
                                                                          Buffers: shared hit=1
                                                                          ->  Seq Scan on public.region  (cost=0.00..1.06 rows=1 width=4) (actual time=0.007..0.007 rows=1.00 loops=1)
                                                                                Output: region.r_regionkey
                                                                                Filter: (region.r_name = 'MIDDLE EAST'::bpchar)
                                                                                Rows Removed by Filter: 4
                                                                                Buffers: shared hit=1
                          ->  Hash  (cost=323.00..323.00 rows=10000 width=8) (actual time=1.391..1.392 rows=10000.00 loops=1)
                                Output: supplier.s_suppkey, supplier.s_nationkey
                                Buckets: 16384  Batches: 1  Memory Usage: 519kB
                                Buffers: shared hit=223
                                ->  Seq Scan on public.supplier  (cost=0.00..323.00 rows=10000 width=8) (actual time=0.009..0.868 rows=10000.00 loops=1)
                                      Output: supplier.s_suppkey, supplier.s_nationkey
                                      Buffers: shared hit=223
Planning:
  Buffers: shared hit=248
Planning Time: 4.842 ms
Execution Time: 774.247 ms
