Changes between Version 21 and Version 22 of OtherTopics


Ignore:
Timestamp:
03/03/26 07:56:24 (3 weeks ago)
Author:
221181
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • OtherTopics

    v21 v22  
    390390
    391391{{{
    392 "Incremental Sort  (cost=18709.65..51808.79 rows=139071 width=321) (actual time=1565.854..5424.998 rows=54435.00 loops=1)"
     392"Incremental Sort  (cost=18709.65..51808.79 rows=139071 width=321) (actual time=1502.222..5150.389 rows=54435.00 loops=1)"
    393393"  Sort Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)) DESC, (sum(((si.quantity)::numeric * si.unit_price_at_sale))) DESC"
    394394"  Presorted Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text))"
     
    396396"  Pre-sorted Groups: 12  Sort Method: quicksort  Average Memory: 568kB  Peak Memory: 615kB"
    397397"  Buffers: shared hit=3632, temp read=1177 written=1180"
    398 "  ->  GroupAggregate  (cost=18708.99..48041.17 rows=139071 width=321) (actual time=1329.729..5304.172 rows=54435.00 loops=1)"
     398"  ->  GroupAggregate  (cost=18708.99..48041.17 rows=139071 width=321) (actual time=1244.690..4960.802 rows=54435.00 loops=1)"
    399399"        Group Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)), w.name, c.name, sup.name"
    400400"        Buffers: shared hit=3632, temp read=1177 written=1180"
    401 "        ->  Incremental Sort  (cost=18708.99..42478.33 rows=139071 width=287) (actual time=1328.886..4726.267 rows=137806.00 loops=1)"
     401"        ->  Incremental Sort  (cost=18708.99..42478.33 rows=139071 width=287) (actual time=1244.650..4576.663 rows=137806.00 loops=1)"
    402402"              Sort Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)) DESC, w.name, c.name, sup.name, s.sale_id"
    403403"              Presorted Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text))"
     
    405405"              Pre-sorted Groups: 12  Sort Method: quicksort  Average Memory: 1262kB  Peak Memory: 1387kB"
    406406"              Buffers: shared hit=3632, temp read=1177 written=1180"
    407 "              ->  Nested Loop  (cost=18708.54..38710.70 rows=139071 width=287) (actual time=1314.716..2114.599 rows=137806.00 loops=1)"
     407"              ->  Nested Loop  (cost=18708.54..38710.70 rows=139071 width=287) (actual time=1218.041..1921.274 rows=137806.00 loops=1)"
    408408"                    Buffers: shared hit=3632, temp read=1177 written=1180"
    409 "                    ->  Gather Merge  (cost=18708.38..34558.39 rows=139071 width=49) (actual time=1314.525..1652.546 rows=137806.00 loops=1)"
     409"                    ->  Gather Merge  (cost=18708.38..34558.39 rows=139071 width=49) (actual time=1217.896..1527.876 rows=137806.00 loops=1)"
    410410"                          Workers Planned: 1"
    411411"                          Workers Launched: 1"
    412412"                          Buffers: shared hit=3626, temp read=1177 written=1180"
    413 "                          ->  Sort  (cost=17708.37..17912.89 rows=81806 width=49) (actual time=1141.709..1184.523 rows=68903.00 loops=2)"
     413"                          ->  Sort  (cost=17708.37..17912.89 rows=81806 width=49) (actual time=1035.053..1072.735 rows=68903.00 loops=2)"
    414414"                                Sort Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)) DESC"
    415 "                                Sort Method: external merge  Disk: 3184kB"
     415"                                Sort Method: external merge  Disk: 3808kB"
    416416"                                Buffers: shared hit=3626, temp read=1177 written=1180"
    417 "                                Worker 0:  Sort Method: external merge  Disk: 6232kB"
    418 "                                ->  Hash Left Join  (cost=3417.20..8236.54 rows=81806 width=49) (actual time=272.961..914.606 rows=68903.00 loops=2)"
     417"                                Worker 0:  Sort Method: external merge  Disk: 5608kB"
     418"                                ->  Hash Left Join  (cost=3417.20..8236.54 rows=81806 width=49) (actual time=187.902..755.631 rows=68903.00 loops=2)"
    419419"                                      Hash Cond: (p.supplier_id = sup.supplier_id)"
    420420"                                      Buffers: shared hit=3618"
    421 "                                      ->  Hash Left Join  (cost=3415.08..8001.47 rows=81806 width=41) (actual time=269.015..793.730 rows=68903.00 loops=2)"
     421"                                      ->  Hash Left Join  (cost=3415.08..8001.47 rows=81806 width=41) (actual time=187.231..600.377 rows=68903.00 loops=2)"
    422422"                                            Hash Cond: (p.category_id = c.category_id)"
    423423"                                            Buffers: shared hit=3616"
    424 "                                            ->  Hash Join  (cost=3412.95..7766.40 rows=81806 width=34) (actual time=265.863..761.031 rows=68903.00 loops=2)"
     424"                                            ->  Hash Join  (cost=3412.95..7766.40 rows=81806 width=34) (actual time=186.809..561.244 rows=68903.00 loops=2)"
    425425"                                                  Hash Cond: (si.product_id = p.product_id)"
    426426"                                                  Buffers: shared hit=3614"
    427 "                                                  ->  Parallel Hash Join  (cost=3233.45..7371.99 rows=81806 width=30) (actual time=242.285..649.734 rows=68903.00 loops=2)"
     427"                                                  ->  Parallel Hash Join  (cost=3233.45..7371.99 rows=81806 width=30) (actual time=178.945..485.528 rows=68903.00 loops=2)"
    428428"                                                        Hash Cond: (si.sale_id = s.sale_id)"
    429429"                                                        Buffers: shared hit=3480"
    430 "                                                        ->  Parallel Seq Scan on sale_item si  (cost=0.00..3675.36 rows=176436 width=18) (actual time=0.020..203.345 rows=149971.00 loops=2)"
     430"                                                        ->  Parallel Seq Scan on sale_item si  (cost=0.00..3675.36 rows=176436 width=18) (actual time=0.033..63.853 rows=149971.00 loops=2)"
    431431"                                                              Buffers: shared hit=1911"
    432 "                                                        ->  Parallel Hash  (cost=2892.53..2892.53 rows=27274 width=16) (actual time=236.811..236.814 rows=22972.00 loops=2)"
     432"                                                        ->  Parallel Hash  (cost=2892.53..2892.53 rows=27274 width=16) (actual time=177.467..177.471 rows=22972.00 loops=2)"
    433433"                                                              Buckets: 65536  Batches: 1  Memory Usage: 2688kB"
    434434"                                                              Buffers: shared hit=1569"
    435 "                                                              ->  Parallel Seq Scan on sale s  (cost=0.00..2892.53 rows=27274 width=16) (actual time=12.339..207.382 rows=22972.00 loops=2)"
     435"                                                              ->  Parallel Seq Scan on sale s  (cost=0.00..2892.53 rows=27274 width=16) (actual time=0.572..152.678 rows=22972.00 loops=2)"
    436436"                                                                    Filter: (date_time >= (date_trunc('month'::text, (CURRENT_DATE)::timestamp with time zone) - '11 mons'::interval))"
    437437"                                                                    Rows Removed by Filter: 27028"
    438438"                                                                    Buffers: shared hit=1569"
    439 "                                                  ->  Hash  (cost=117.00..117.00 rows=5000 width=12) (actual time=23.432..23.434 rows=5000.00 loops=2)"
     439"                                                  ->  Hash  (cost=117.00..117.00 rows=5000 width=12) (actual time=7.722..7.723 rows=5000.00 loops=2)"
    440440"                                                        Buckets: 8192  Batches: 1  Memory Usage: 279kB"
    441441"                                                        Buffers: shared hit=134"
    442 "                                                        ->  Seq Scan on product p  (cost=0.00..117.00 rows=5000 width=12) (actual time=1.523..20.547 rows=5000.00 loops=2)"
     442"                                                        ->  Seq Scan on product p  (cost=0.00..117.00 rows=5000 width=12) (actual time=5.217..6.503 rows=5000.00 loops=2)"
    443443"                                                              Buffers: shared hit=134"
    444 "                                            ->  Hash  (cost=1.50..1.50 rows=50 width=15) (actual time=3.117..3.118 rows=50.00 loops=2)"
     444"                                            ->  Hash  (cost=1.50..1.50 rows=50 width=15) (actual time=0.402..0.403 rows=50.00 loops=2)"
    445445"                                                  Buckets: 1024  Batches: 1  Memory Usage: 11kB"
    446446"                                                  Buffers: shared hit=2"
    447 "                                                  ->  Seq Scan on category c  (cost=0.00..1.50 rows=50 width=15) (actual time=3.062..3.090 rows=50.00 loops=2)"
     447"                                                  ->  Seq Scan on category c  (cost=0.00..1.50 rows=50 width=15) (actual time=0.367..0.375 rows=50.00 loops=2)"
    448448"                                                        Buffers: shared hit=2"
    449 "                                      ->  Hash  (cost=1.50..1.50 rows=50 width=16) (actual time=2.975..2.976 rows=50.00 loops=2)"
     449"                                      ->  Hash  (cost=1.50..1.50 rows=50 width=16) (actual time=0.511..0.512 rows=50.00 loops=2)"
    450450"                                            Buckets: 1024  Batches: 1  Memory Usage: 11kB"
    451451"                                            Buffers: shared hit=2"
    452 "                                            ->  Seq Scan on supplier sup  (cost=0.00..1.50 rows=50 width=16) (actual time=2.935..2.944 rows=50.00 loops=2)"
     452"                                            ->  Seq Scan on supplier sup  (cost=0.00..1.50 rows=50 width=16) (actual time=0.479..0.486 rows=50.00 loops=2)"
    453453"                                                  Buffers: shared hit=2"
    454454"                    ->  Memoize  (cost=0.15..0.17 rows=1 width=222) (actual time=0.001..0.001 rows=1.00 loops=137806)"
     
    457457"                          Hits: 137803  Misses: 3  Evictions: 0  Overflows: 0  Memory Usage: 1kB"
    458458"                          Buffers: shared hit=6"
    459 "                          ->  Index Scan using warehouse_pkey on warehouse w  (cost=0.14..0.16 rows=1 width=222) (actual time=0.049..0.049 rows=1.00 loops=3)"
     459"                          ->  Index Scan using warehouse_pkey on warehouse w  (cost=0.14..0.16 rows=1 width=222) (actual time=0.029..0.029 rows=1.00 loops=3)"
    460460"                                Index Cond: (warehouse_id = s.warehouse_id)"
    461461"                                Index Searches: 3"
     
    463463"Planning:"
    464464"  Buffers: shared hit=36"
    465 "Planning Time: 24.201 ms"
    466 "Execution Time: 5467.920 ms"
    467 }}}
    468 
     465"Planning Time: 3.051 ms"
     466"Execution Time: 5241.032 ms"
     467}}}
     468