Changes between Version 27 and Version 28 of OtherTopics
- Timestamp:
- 03/03/26 08:26:38 (3 weeks ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OtherTopics
v27 v28 394 394 395 395 {{{ 396 "Incremental Sort (cost=1 8709.65..51808.79 rows=139071 width=321) (actual time=1203.775..4048.807rows=54435.00 loops=1)"396 "Incremental Sort (cost=15402.59..32868.22 rows=69037 width=321) (actual time=1631.360..4583.371 rows=54435.00 loops=1)" 397 397 " 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" 398 398 " Presorted Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text))" 399 399 " Full-sort Groups: 12 Sort Method: quicksort Average Memory: 30kB Peak Memory: 30kB" 400 400 " Pre-sorted Groups: 12 Sort Method: quicksort Average Memory: 568kB Peak Memory: 615kB" 401 " Buffers: shared hit= 3632, temp read=1176 written=1178"402 " -> GroupAggregate (cost=1 8708.99..48041.17 rows=139071 width=321) (actual time=962.536..3915.891rows=54435.00 loops=1)"401 " Buffers: shared hit=5013, temp read=1177 written=1180" 402 " -> GroupAggregate (cost=15402.25..30566.84 rows=69037 width=321) (actual time=1396.809..4486.919 rows=54435.00 loops=1)" 403 403 " Group Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)), w.name, c.name, sup.name" 404 " Buffers: shared hit= 3632, temp read=1176 written=1178"405 " -> Incremental Sort (cost=1 8708.99..42478.33 rows=139071 width=287) (actual time=962.508..3639.938rows=137806.00 loops=1)"404 " Buffers: shared hit=5013, temp read=1177 written=1180" 405 " -> Incremental Sort (cost=15402.25..27805.36 rows=69037 width=287) (actual time=1396.785..4195.430 rows=137806.00 loops=1)" 406 406 " Sort Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)) DESC, w.name, c.name, sup.name, s.sale_id" 407 407 " Presorted Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text))" 408 408 " Full-sort Groups: 12 Sort Method: quicksort Average Memory: 30kB Peak Memory: 30kB" 409 409 " Pre-sorted Groups: 12 Sort Method: quicksort Average Memory: 1262kB Peak Memory: 1387kB" 410 " Buffers: shared hit= 3632, temp read=1176 written=1178"411 " -> Nested Loop (cost=1 8708.54..38710.70 rows=139071 width=287) (actual time=954.168..1565.615rows=137806.00 loops=1)"412 " Buffers: shared hit= 3632, temp read=1176 written=1178"413 " -> Gather Merge (cost=1 8708.38..34558.39 rows=139071 width=49) (actual time=954.104..1231.027rows=137806.00 loops=1)"414 " Workers Planned: 1"415 " Workers Launched: 1"416 " Buffers: shared hit= 3626, temp read=1176 written=1178"417 " -> Sort (cost=1 7708.37..17912.89 rows=81806 width=49) (actual time=800.477..843.097 rows=68903.00 loops=2)"410 " Buffers: shared hit=5013, temp read=1177 written=1180" 411 " -> Nested Loop (cost=15402.02..25503.97 rows=69037 width=287) (actual time=1386.649..1961.612 rows=137806.00 loops=1)" 412 " Buffers: shared hit=5013, temp read=1177 written=1180" 413 " -> Gather Merge (cost=15401.87..23442.37 rows=69037 width=49) (actual time=1386.587..1595.529 rows=137806.00 loops=1)" 414 " Workers Planned: 2" 415 " Workers Launched: 2" 416 " Buffers: shared hit=5007, temp read=1177 written=1180" 417 " -> Sort (cost=14401.85..14473.76 rows=28765 width=49) (actual time=1137.373..1153.034 rows=45935.33 loops=3)" 418 418 " Sort Key: (to_char(date_trunc('month'::text, s.date_time), 'YYYY-MM'::text)) DESC" 419 " Sort Method: external merge Disk: 4384kB" 420 " Buffers: shared hit=3626, temp read=1176 written=1178" 421 " Worker 0: Sort Method: external merge Disk: 5024kB" 422 " -> Hash Left Join (cost=3417.20..8236.54 rows=81806 width=49) (actual time=120.116..557.712 rows=68903.00 loops=2)" 419 " Sort Method: external merge Disk: 3416kB" 420 " Buffers: shared hit=5007, temp read=1177 written=1180" 421 " Worker 0: Sort Method: external merge Disk: 3080kB" 422 " Worker 1: Sort Method: external merge Disk: 2920kB" 423 " -> Hash Left Join (cost=5054.17..12271.51 rows=28765 width=49) (actual time=52.064..800.213 rows=45935.33 loops=3)" 423 424 " Hash Cond: (p.supplier_id = sup.supplier_id)" 424 " Buffers: shared hit= 3618"425 " -> Hash Left Join (cost= 3415.08..8001.47 rows=81806 width=41) (actual time=119.725..377.104 rows=68903.00 loops=2)"425 " Buffers: shared hit=4991" 426 " -> Hash Left Join (cost=5052.04..12187.48 rows=28765 width=41) (actual time=51.475..514.523 rows=45935.33 loops=3)" 426 427 " Hash Cond: (p.category_id = c.category_id)" 427 " Buffers: shared hit= 3616"428 " -> Hash Join (cost= 3412.95..7766.40 rows=81806 width=34) (actual time=119.386..319.506 rows=68903.00 loops=2)"428 " Buffers: shared hit=4988" 429 " -> Hash Join (cost=5049.92..12103.45 rows=28765 width=34) (actual time=35.759..412.608 rows=45935.33 loops=3)" 429 430 " Hash Cond: (si.product_id = p.product_id)" 430 " Buffers: shared hit= 3614"431 " -> Parallel Hash Join (cost= 3233.45..7371.99 rows=81806 width=30) (actual time=116.983..266.418 rows=68903.00 loops=2)"431 " Buffers: shared hit=4985" 432 " -> Parallel Hash Join (cost=4870.42..11848.37 rows=28765 width=30) (actual time=19.082..351.040 rows=45935.33 loops=3)" 432 433 " Hash Cond: (si.sale_id = s.sale_id)" 433 " Buffers: shared hit= 3480"434 " -> Parallel Seq Scan on sale_item si (cost=0.00.. 3675.36 rows=176436 width=18) (actual time=0.010..27.036 rows=149971.00 loops=2)"435 " Buffers: shared hit= 1911"436 " -> Parallel Hash (cost= 2892.53..2892.53 rows=27274 width=16) (actual time=116.725..116.728 rows=22972.00 loops=2)"434 " Buffers: shared hit=4784" 435 " -> Parallel Seq Scan on sale_item si (cost=0.00..6321.76 rows=249976 width=18) (actual time=0.010..62.241 rows=199980.67 loops=3)" 436 " Buffers: shared hit=3822" 437 " -> Parallel Hash (cost=4630.68..4630.68 rows=19179 width=16) (actual time=18.883..18.885 rows=15314.67 loops=3)" 437 438 " Buckets: 65536 Batches: 1 Memory Usage: 2688kB" 438 " Buffers: shared hit=1569" 439 " -> Parallel Seq Scan on sale s (cost=0.00..2892.53 rows=27274 width=16) (actual time=0.738..209.158 rows=45944.00 loops=1)" 440 " Filter: (date_time >= (date_trunc('month'::text, (CURRENT_DATE)::timestamp with time zone) - '11 mons'::interval))" 441 " Rows Removed by Filter: 54056" 442 " Buffers: shared hit=1569" 443 " -> Hash (cost=117.00..117.00 rows=5000 width=12) (actual time=2.353..2.354 rows=5000.00 loops=2)" 439 " Buffers: shared hit=962" 440 " -> Parallel Bitmap Heap Scan on sale s (cost=865.16..4630.68 rows=19179 width=16) (actual time=4.829..41.186 rows=45944.00 loops=1)" 441 " Recheck Cond: (date_time >= (date_trunc('month'::text, (CURRENT_DATE)::timestamp with time zone) - '11 mons'::interval))" 442 " Heap Blocks: exact=834" 443 " Buffers: shared hit=962" 444 " -> Bitmap Index Scan on idx_sale_date_time (cost=0.00..853.65 rows=46029 width=0) (actual time=4.633..4.633 rows=45944.00 loops=1)" 445 " Index Cond: (date_time >= (date_trunc('month'::text, (CURRENT_DATE)::timestamp with time zone) - '11 mons'::interval))" 446 " Index Searches: 1" 447 " Buffers: shared hit=128" 448 " -> Hash (cost=117.00..117.00 rows=5000 width=12) (actual time=16.629..16.629 rows=5000.00 loops=3)" 444 449 " Buckets: 8192 Batches: 1 Memory Usage: 279kB" 445 " Buffers: shared hit= 134"446 " -> Seq Scan on product p (cost=0.00..117.00 rows=5000 width=12) (actual time= 0.305..1.369 rows=5000.00 loops=2)"447 " Buffers: shared hit= 134"448 " -> Hash (cost=1.50..1.50 rows=50 width=15) (actual time= 0.321..0.321 rows=50.00 loops=2)"450 " Buffers: shared hit=201" 451 " -> Seq Scan on product p (cost=0.00..117.00 rows=5000 width=12) (actual time=14.267..15.406 rows=5000.00 loops=3)" 452 " Buffers: shared hit=201" 453 " -> Hash (cost=1.50..1.50 rows=50 width=15) (actual time=15.699..15.700 rows=50.00 loops=3)" 449 454 " Buckets: 1024 Batches: 1 Memory Usage: 11kB" 450 " Buffers: shared hit= 2"451 " -> Seq Scan on category c (cost=0.00..1.50 rows=50 width=15) (actual time= 0.294..0.301 rows=50.00 loops=2)"452 " Buffers: shared hit= 2"453 " -> Hash (cost=1.50..1.50 rows=50 width=16) (actual time=0. 243..0.244 rows=50.00 loops=2)"455 " Buffers: shared hit=3" 456 " -> Seq Scan on category c (cost=0.00..1.50 rows=50 width=15) (actual time=15.667..15.674 rows=50.00 loops=3)" 457 " Buffers: shared hit=3" 458 " -> Hash (cost=1.50..1.50 rows=50 width=16) (actual time=0.403..0.404 rows=50.00 loops=3)" 454 459 " Buckets: 1024 Batches: 1 Memory Usage: 11kB" 455 " Buffers: shared hit= 2"456 " -> Seq Scan on supplier sup (cost=0.00..1.50 rows=50 width=16) (actual time=0. 219..0.226 rows=50.00 loops=2)"457 " Buffers: shared hit= 2"458 " -> Memoize (cost=0.15..0.17 rows=1 width=222) (actual time=0.00 0..0.000rows=1.00 loops=137806)"460 " Buffers: shared hit=3" 461 " -> Seq Scan on supplier sup (cost=0.00..1.50 rows=50 width=16) (actual time=0.374..0.381 rows=50.00 loops=3)" 462 " Buffers: shared hit=3" 463 " -> Memoize (cost=0.15..0.17 rows=1 width=222) (actual time=0.001..0.001 rows=1.00 loops=137806)" 459 464 " Cache Key: s.warehouse_id" 460 465 " Cache Mode: logical" 461 466 " Hits: 137803 Misses: 3 Evictions: 0 Overflows: 0 Memory Usage: 1kB" 462 467 " Buffers: shared hit=6" 463 " -> Index Scan using warehouse_pkey on warehouse w (cost=0.14..0.16 rows=1 width=222) (actual time=0.01 5..0.015rows=1.00 loops=3)"468 " -> Index Scan using warehouse_pkey on warehouse w (cost=0.14..0.16 rows=1 width=222) (actual time=0.014..0.014 rows=1.00 loops=3)" 464 469 " Index Cond: (warehouse_id = s.warehouse_id)" 465 470 " Index Searches: 3" 466 471 " Buffers: shared hit=6" 467 472 "Planning:" 468 " Buffers: shared hit=3 6"469 "Planning Time: 1.8 63ms"470 "Execution Time: 4 099.577ms"471 }}} 472 473 '''Времетраење: 4 099.577ms'''473 " Buffers: shared hit=38" 474 "Planning Time: 1.872 ms" 475 "Execution Time: 4630.112 ms" 476 }}} 477 478 '''Времетраење: 4630.112 ms''' 474 479 475 480 '''Анализа:''' По добро.
