explain.depesz.com

PostgreSQL's explain analyze made readable

Result: yMGB

Settings
# exclusive inclusive rows x rows loops node
1. 16.756 84,591.994 ↓ 2.9 42,640 1

Unique (cost=1,966,803.38..1,966,875.77 rows=14,478 width=444) (actual time=84,554.827..84,591.994 rows=42,640 loops=1)

  • Buffers: shared hit=234,852 read=256,850 dirtied=5, temp read=92,292 written=94,832
  • I/O Timings: read=62,867.248
2. 123.412 84,575.238 ↓ 3.5 51,223 1

Sort (cost=1,966,803.38..1,966,839.58 rows=14,478 width=444) (actual time=84,554.825..84,575.238 rows=51,223 loops=1)

  • Sort Key: sd.id, ve.created_at DESC
  • Sort Method: external merge Disk: 14,488kB
  • Buffers: shared hit=234,852 read=256,850 dirtied=5, temp read=92,292 written=94,832
  • I/O Timings: read=62,867.248
3. 92.660 84,451.826 ↓ 3.5 51,223 1

Hash Join (cost=1,823,714.25..1,964,132.84 rows=14,478 width=444) (actual time=41,819.243..84,451.826 rows=51,223 loops=1)

  • Hash Cond: (mv.merchant_id = m.id)
  • Buffers: shared hit=234,852 read=256,850 dirtied=5, temp read=90,481 written=93,015
  • I/O Timings: read=62,867.248
4. 193.905 84,355.867 ↓ 3.5 51,223 1

Hash Left Join (cost=1,823,618.66..1,963,854.37 rows=14,478 width=240) (actual time=41,815.915..84,355.867 rows=51,223 loops=1)

  • Hash Cond: (sd.stock_batch_id = transfers.id)
  • Buffers: shared hit=234,844 read=256,799 dirtied=5, temp read=90,481 written=93,015
  • I/O Timings: read=62,864.618
5. 61.544 83,352.526 ↓ 4.9 51,223 1

Nested Loop Left Join (cost=1,763,579.21..1,902,312.68 rows=10,375 width=240) (actual time=41,006.343..83,352.526 rows=51,223 loops=1)

  • Buffers: shared hit=230,184 read=254,807 dirtied=5, temp read=87,312 written=89,882
  • I/O Timings: read=62,669.448
6. 41.270 41,469.116 ↓ 4.4 46,161 1

Hash Join (cost=1,763,578.65..1,834,924.65 rows=10,375 width=219) (actual time=41,005.062..41,469.116 rows=46,161 loops=1)

  • Hash Cond: (p.brand_id = b.id)
  • Buffers: shared hit=41,106 read=192,057 dirtied=5, temp read=87,312 written=89,882
  • I/O Timings: read=22,505.128
7. 175.135 41,426.681 ↓ 4.4 46,161 1

Hash Join (cost=1,763,467.81..1,834,786.54 rows=10,375 width=215) (actual time=41,003.881..41,426.681 rows=46,161 loops=1)

  • Hash Cond: (sd.id = stock.stock_distribution_id)
  • Buffers: shared hit=41,061 read=192,057 dirtied=5, temp read=87,312 written=89,882
  • I/O Timings: read=22,505.128
8. 0.000 2,479.141 ↓ 1.2 554,895 1

Gather (cost=54,869.84..124,985.03 rows=458,485 width=183) (actual time=2,231.422..2,479.141 rows=554,895 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=18,948 read=23,514 dirtied=5, temp read=15,757 written=16,064
  • I/O Timings: read=2,400.845
9. 143.954 2,844.652 ↑ 1.0 184,965 3 / 3

Parallel Hash Join (cost=53,869.84..78,136.53 rows=191,035 width=183) (actual time=2,231.894..2,844.652 rows=184,965 loops=3)

  • Hash Cond: (v.product_id = p.id)
  • Buffers: shared hit=18,948 read=23,514 dirtied=5, temp read=15,757 written=16,064
  • I/O Timings: read=2,400.845
10. 147.908 2,669.818 ↑ 1.0 184,965 3 / 3

Parallel Hash Join (cost=49,981.64..73,746.83 rows=191,035 width=144) (actual time=2,199.902..2,669.818 rows=184,965 loops=3)

  • Hash Cond: (mv.variant_id = v.id)
  • Buffers: shared hit=15,506 read=23,514 dirtied=5, temp read=15,757 written=16,064
  • I/O Timings: read=2,400.845
11. 107.479 2,356.741 ↑ 1.1 186,298 3 / 3

Hash Left Join (cost=42,237.00..65,477.91 rows=199,715 width=120) (actual time=2,032.364..2,356.741 rows=186,298 loops=3)

  • Hash Cond: (sd.id = c.object_id)
  • Buffers: shared hit=8,733 read=23,514 dirtied=5, temp read=15,757 written=16,064
  • I/O Timings: read=2,400.845
12. 363.565 2,200.499 ↑ 1.1 186,298 3 / 3

Parallel Hash Join (cost=40,484.89..63,201.55 rows=199,715 width=111) (actual time=1,983.379..2,200.499 rows=186,298 loops=3)

  • Hash Cond: (sd.stock_batch_id = sb.id)
  • Buffers: shared hit=7,483 read=22,915 dirtied=2, temp read=15,757 written=16,064
  • I/O Timings: read=2,388.636
13. 280.356 893.276 ↑ 1.2 163,594 3 / 3

Parallel Hash Join (cost=14,403.95..30,751.99 rows=203,388 width=55) (actual time=711.219..893.276 rows=163,594 loops=3)

  • Hash Cond: (sd.stock_location_id = sl.id)
  • Buffers: shared hit=7,121 read=9,428, temp read=7,049 written=7,208
  • I/O Timings: read=1,157.891
14. 235.135 235.135 ↑ 1.2 163,594 3 / 3

Parallel Seq Scan on stock_distributions sd (cost=0.00..10,841.15 rows=203,388 width=45) (actual time=0.014..235.135 rows=163,594 loops=3)

  • Filter: ((tag)::text = 'Display'::text)
  • Rows Removed by Filter: 10,528
  • Buffers: shared hit=7,093 read=1,044
  • I/O Timings: read=444.976
15. 76.278 377.785 ↑ 1.3 163,202 3 / 3

Parallel Hash (cost=10,454.20..10,454.20 rows=204,220 width=26) (actual time=377.784..377.785 rows=163,202 loops=3)

  • Buckets: 65,536 Batches: 16 Memory Usage: 2,496kB
  • Buffers: shared hit=28 read=8,384, temp written=3,024
  • I/O Timings: read=712.915
16. 301.507 301.507 ↑ 1.3 163,202 3 / 3

Parallel Seq Scan on stock_locations sl (cost=0.00..10,454.20 rows=204,220 width=26) (actual time=0.478..301.507 rows=163,202 loops=3)

  • Buffers: shared hit=28 read=8,384
  • I/O Timings: read=712.915
17. 56.017 943.658 ↑ 1.1 72,796 3 / 3

Parallel Hash (cost=24,257.23..24,257.23 rows=81,896 width=56) (actual time=943.658..943.658 rows=72,796 loops=3)

  • Buckets: 65,536 Batches: 8 Memory Usage: 2,656kB
  • Buffers: shared hit=362 read=13,487 dirtied=2, temp read=2,349 written=4,028
  • I/O Timings: read=1,230.745
18. 67.549 887.641 ↑ 1.1 72,796 3 / 3

Parallel Hash Left Join (cost=16,769.78..24,257.23 rows=81,896 width=56) (actual time=640.721..887.641 rows=72,796 loops=3)

  • Hash Cond: (sri.stock_request_id = sr.id)
  • Buffers: shared hit=362 read=13,487 dirtied=2, temp read=2,349 written=2,428
  • I/O Timings: read=1,230.745
19. 92.465 761.967 ↑ 1.1 72,796 3 / 3

Parallel Hash Join (cost=15,281.87..22,554.31 rows=81,896 width=56) (actual time=581.841..761.967 rows=72,796 loops=3)

  • Hash Cond: (sb.merchant_variant_id = mv.id)
  • Buffers: shared hit=290 read=12,531 dirtied=2, temp read=2,349 written=2,428
  • I/O Timings: read=1,103.772
20. 123.117 503.637 ↑ 1.2 67,048 3 / 3

Parallel Hash Left Join (cost=8,713.45..15,191.40 rows=83,402 width=40) (actual time=415.573..503.637 rows=67,048 loops=3)

  • Hash Cond: (sb.stock_request_item_id = sri.id)
  • Buffers: shared hit=238 read=8,859 dirtied=2, temp read=2,349 written=2,428
  • I/O Timings: read=836.668
21. 119.405 119.405 ↑ 1.2 67,048 3 / 3

Parallel Seq Scan on stock_batches sb (cost=0.00..4,389.02 rows=83,402 width=40) (actual time=0.483..119.405 rows=67,048 loops=3)

  • Buffers: shared hit=134 read=3,421
  • I/O Timings: read=285.848
22. 43.933 261.115 ↑ 1.2 94,806 3 / 3

Parallel Hash (cost=6,699.98..6,699.98 rows=115,798 width=16) (actual time=261.114..261.115 rows=94,806 loops=3)

  • Buckets: 131,072 Batches: 8 Memory Usage: 2,752kB
  • Buffers: shared hit=104 read=5,438 dirtied=2, temp written=1,144
  • I/O Timings: read=550.819
23. 217.182 217.182 ↑ 1.2 94,806 3 / 3

Parallel Seq Scan on stock_request_items sri (cost=0.00..6,699.98 rows=115,798 width=16) (actual time=0.483..217.182 rows=94,806 loops=3)

  • Buffers: shared hit=104 read=5,438 dirtied=2
  • I/O Timings: read=550.819
24. 17.909 165.865 ↑ 1.7 35,710 3 / 3

Parallel Hash (cost=5,828.28..5,828.28 rows=59,211 width=32) (actual time=165.865..165.865 rows=35,710 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 7,776kB
  • Buffers: shared hit=52 read=3,672
  • I/O Timings: read=267.105
25. 24.967 147.956 ↑ 1.7 35,710 3 / 3

Parallel Hash Join (cost=3,087.73..5,828.28 rows=59,211 width=32) (actual time=68.836..147.956 rows=35,710 loops=3)

  • Hash Cond: (mp.merchant_variant_id = mv.id)
  • Buffers: shared hit=52 read=3,672
  • I/O Timings: read=267.105
26. 54.536 54.536 ↑ 1.7 35,712 3 / 3

Parallel Seq Scan on merchant_prices mp (cost=0.00..2,585.11 rows=59,211 width=8) (actual time=0.093..54.536 rows=35,712 loops=3)

  • Buffers: shared hit=7 read=1,986
  • I/O Timings: read=145.126
27. 17.336 68.453 ↑ 1.7 34,967 3 / 3

Parallel Hash (cost=2,333.99..2,333.99 rows=60,299 width=24) (actual time=68.453..68.453 rows=34,967 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 6,816kB
  • Buffers: shared hit=45 read=1,686
  • I/O Timings: read=121.978
28. 51.117 51.117 ↑ 1.7 34,967 3 / 3

Parallel Seq Scan on merchant_variants mv (cost=0.00..2,333.99 rows=60,299 width=24) (actual time=0.512..51.117 rows=34,967 loops=3)

  • Buffers: shared hit=45 read=1,686
  • I/O Timings: read=121.978
29. 7.390 58.125 ↑ 1.8 11,593 3 / 3

Parallel Hash (cost=1,232.41..1,232.41 rows=20,441 width=16) (actual time=58.125..58.125 rows=11,593 loops=3)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,112kB
  • Buffers: shared hit=72 read=956
  • I/O Timings: read=126.973
30. 50.735 50.735 ↑ 1.8 11,593 3 / 3

Parallel Seq Scan on stock_requests sr (cost=0.00..1,232.41 rows=20,441 width=16) (actual time=0.238..50.735 rows=11,593 loops=3)

  • Buffers: shared hit=72 read=956
  • I/O Timings: read=126.973
31. 19.733 48.763 ↑ 1.0 38,729 3 / 3

Hash (cost=1,247.50..1,247.50 rows=40,369 width=13) (actual time=48.762..48.763 rows=38,729 loops=3)

  • Buckets: 65,536 Batches: 1 Memory Usage: 2,328kB
  • Buffers: shared hit=1,228 read=599 dirtied=3
  • I/O Timings: read=12.209
32. 29.030 29.030 ↑ 1.0 38,729 3 / 3

Seq Scan on codes c (cost=0.00..1,247.50 rows=40,369 width=13) (actual time=0.017..29.030 rows=38,729 loops=3)

  • Filter: ((object_type)::text = 'StockDistribution'::text)
  • Rows Removed by Filter: 10,189
  • Buffers: shared hit=1,228 read=599 dirtied=3
  • I/O Timings: read=12.209
33. 87.108 165.169 ↑ 1.2 33,911 3 / 3

Parallel Hash (cost=7,215.52..7,215.52 rows=42,329 width=40) (actual time=165.169..165.169 rows=33,911 loops=3)

  • Buckets: 131,072 Batches: 1 Memory Usage: 8,480kB
  • Buffers: shared hit=6,773
34. 78.061 78.061 ↑ 1.2 33,911 3 / 3

Parallel Seq Scan on variants v (cost=0.00..7,215.52 rows=42,329 width=40) (actual time=0.012..78.061 rows=33,911 loops=3)

  • Filter: (discarded_at IS NULL)
  • Rows Removed by Filter: 1,517
  • Buffers: shared hit=6,773
35. 18.180 30.880 ↑ 1.2 19,411 3 / 3

Parallel Hash (cost=3,585.87..3,585.87 rows=24,187 width=55) (actual time=30.880..30.880 rows=19,411 loops=3)

  • Buckets: 65,536 Batches: 1 Memory Usage: 5,760kB
  • Buffers: shared hit=3,344
36. 12.700 12.700 ↑ 1.2 19,411 3 / 3

Parallel Seq Scan on products p (cost=0.00..3,585.87 rows=24,187 width=55) (actual time=0.007..12.700 rows=19,411 loops=3)

  • Buffers: shared hit=3,344
37. 18.547 38,772.405 ↓ 3.8 45,038 1

Hash (cost=1,708,451.11..1,708,451.11 rows=11,749 width=40) (actual time=38,772.405..38,772.405 rows=45,038 loops=1)

  • Buckets: 65,536 (originally 16384) Batches: 1 (originally 1) Memory Usage: 3,679kB
  • Buffers: shared hit=22,113 read=168,543, temp read=71,555 written=73,818
  • I/O Timings: read=20,104.283
38. 13.405 38,753.858 ↓ 3.8 45,038 1

Subquery Scan on stock (cost=1,586,568.39..1,708,451.11 rows=11,749 width=40) (actual time=35,933.626..38,753.858 rows=45,038 loops=1)

  • Buffers: shared hit=22,113 read=168,543, temp read=71,555 written=73,818
  • I/O Timings: read=20,104.283
39. 132.636 38,740.453 ↓ 3.8 45,038 1

Finalize GroupAggregate (cost=1,586,568.39..1,708,333.62 rows=11,749 width=40) (actual time=35,933.623..38,740.453 rows=45,038 loops=1)

  • Group Key: sm.stock_distribution_id
  • Filter: (COALESCE(sum(sm.quantity), '0'::bigint) > 0)
  • Rows Removed by Filter: 201,612
  • Buffers: shared hit=22,113 read=168,543, temp read=71,555 written=73,818
  • I/O Timings: read=20,104.283
40. 1,006.813 38,607.817 ↓ 7.4 524,887 1

Gather Merge (cost=1,586,568.39..1,706,835.62 rows=70,494 width=40) (actual time=35,932.264..38,607.817 rows=524,887 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=70,369 read=503,592 dirtied=1, temp read=217,032 written=220,645
  • I/O Timings: read=60,366.217
41. 1,210.722 37,601.004 ↓ 5.0 174,962 3 / 3

Partial GroupAggregate (cost=1,585,568.36..1,697,698.84 rows=35,247 width=40) (actual time=35,809.696..37,601.004 rows=174,962 loops=3)

  • Group Key: sm.stock_distribution_id
  • Buffers: shared hit=70,369 read=503,592 dirtied=1, temp read=217,032 written=220,645
  • I/O Timings: read=60,366.217
42. 2,369.983 36,390.282 ↑ 2.8 1,434,397 3 / 3

Sort (cost=1,585,568.36..1,595,730.00 rows=4,064,655 width=39) (actual time=35,809.545..36,390.282 rows=1,434,397 loops=3)

  • Sort Key: sm.stock_distribution_id
  • Sort Method: external merge Disk: 64,848kB
  • Worker 0: Sort Method: external merge Disk: 62,448kB
  • Worker 1: Sort Method: external merge Disk: 75,408kB
  • Buffers: shared hit=70,363 read=503,592 dirtied=1, temp read=217,032 written=220,645
  • I/O Timings: read=60,366.217
43. 2,578.895 34,020.299 ↑ 2.8 1,434,397 3 / 3

Parallel Hash Left Join (cost=544,708.36..1,012,352.93 rows=4,064,655 width=39) (actual time=32,292.735..34,020.299 rows=1,434,397 loops=3)

  • Hash Cond: (pi.package_id = p_1.id)
  • Buffers: shared hit=70,307 read=503,592 dirtied=1, temp read=174,581 written=178,084
  • I/O Timings: read=60,366.217
44. 3,745.530 27,889.679 ↑ 2.8 1,434,397 3 / 3

Parallel Hash Left Join (cost=444,734.44..831,785.26 rows=4,064,655 width=35) (actual time=24,987.329..27,889.679 rows=1,434,397 loops=3)

  • Hash Cond: (sm.package_item_id = pi.id)
  • Buffers: shared hit=68,587 read=436,354, temp read=130,593 written=133,508
  • I/O Timings: read=51,708.965
45. 2,689.179 10,626.241 ↑ 2.8 1,434,397 3 / 3

Parallel Hash Join (cost=32,057.24..336,164.35 rows=4,064,655 width=20) (actual time=9,101.192..10,626.241 rows=1,434,397 loops=3)

  • Hash Cond: (sm.stock_distribution_id = sd_1.id)
  • Buffers: shared hit=68,028 read=129,974, temp read=55,282 written=55,404
  • I/O Timings: read=19,108.369
46. 7,517.814 7,517.814 ↑ 1.3 3,274,563 3 / 3

Parallel Seq Scan on stock_movements sm (cost=0.00..222,633.40 rows=4,118,040 width=20) (actual time=0.114..7,517.814 rows=3,274,563 loops=3)

  • Buffers: shared hit=51,479 read=129,974
  • I/O Timings: read=19,108.369
47. 37.559 419.248 ↑ 2.6 82,236 3 / 3

Parallel Hash (cost=28,553.16..28,553.16 rows=213,527 width=8) (actual time=419.248..419.248 rows=82,236 loops=3)

  • Buckets: 131,072 Batches: 8 Memory Usage: 2,272kB
  • Buffers: shared hit=16,549, temp read=3,766 written=4,592
48. 156.994 381.689 ↑ 2.6 82,236 3 / 3

Parallel Hash Join (cost=14,782.97..28,553.16 rows=213,527 width=8) (actual time=300.700..381.689 rows=82,236 loops=3)

  • Hash Cond: (sd_1.stock_location_id = sl_1.id)
  • Buffers: shared hit=16,549, temp read=3,766 written=3,824
49. 69.524 69.524 ↑ 1.2 174,122 3 / 3

Parallel Seq Scan on stock_distributions sd_1 (cost=0.00..10,300.32 rows=216,332 width=16) (actual time=0.010..69.524 rows=174,122 loops=3)

  • Buffers: shared hit=8,137
50. 68.250 155.171 ↑ 1.3 161,068 3 / 3

Parallel Hash (cost=11,475.31..11,475.31 rows=201,573 width=8) (actual time=155.171..155.171 rows=161,068 loops=3)

  • Buckets: 131,072 Batches: 8 Memory Usage: 3,424kB
  • Buffers: shared hit=8,412, temp written=1,484
51. 86.921 86.921 ↑ 1.3 161,068 3 / 3

Parallel Seq Scan on stock_locations sl_1 (cost=0.00..11,475.31 rows=201,573 width=8) (actual time=0.355..86.921 rows=161,068 loops=3)

  • Filter: ((site_id = 4) AND ((kind)::text = 'Display'::text))
  • Rows Removed by Filter: 2,134
  • Buffers: shared hit=8,412
52. 1,348.794 13,517.908 ↑ 1.4 2,613,270 3 / 3

Parallel Hash (cost=342,982.64..342,982.64 rows=3,604,364 width=31) (actual time=13,517.908..13,517.908 rows=2,613,270 loops=3)

  • Buckets: 65,536 Batches: 256 Memory Usage: 2,560kB
  • Buffers: shared hit=559 read=306,380, temp written=53,720
  • I/O Timings: read=32,600.596
53. 12,169.114 12,169.114 ↑ 1.4 2,613,270 3 / 3

Parallel Seq Scan on package_items pi (cost=0.00..342,982.64 rows=3,604,364 width=31) (actual time=1.091..12,169.114 rows=2,613,270 loops=3)

  • Buffers: shared hit=559 read=306,380
  • I/O Timings: read=32,600.596
54. 337.043 3,551.725 ↑ 1.2 876,937 3 / 3

Parallel Hash (cost=79,884.19..79,884.19 rows=1,094,219 width=20) (actual time=3,551.725..3,551.725 rows=876,937 loops=3)

  • Buckets: 65,536 Batches: 64 Memory Usage: 2,816kB
  • Buffers: shared hit=1,704 read=67,238 dirtied=1, temp written=14,284
  • I/O Timings: read=8,657.252
55. 3,214.682 3,214.682 ↑ 1.2 876,937 3 / 3

Parallel Seq Scan on packages p_1 (cost=0.00..79,884.19 rows=1,094,219 width=20) (actual time=0.584..3,214.682 rows=876,937 loops=3)

  • Buffers: shared hit=1,704 read=67,238 dirtied=1
  • I/O Timings: read=8,657.252
56. 0.493 1.165 ↑ 1.0 2,893 1

Hash (cost=74.26..74.26 rows=2,926 width=20) (actual time=1.165..1.165 rows=2,893 loops=1)

  • Buckets: 4,096 Batches: 1 Memory Usage: 190kB
  • Buffers: shared hit=45
57. 0.672 0.672 ↑ 1.0 2,893 1

Seq Scan on brands b (cost=0.00..74.26 rows=2,926 width=20) (actual time=0.006..0.672 rows=2,893 loops=1)

  • Buffers: shared hit=45
58. 41,821.866 41,821.866 ↑ 1.0 1 46,161

Index Scan using index_versions_on_item_type_and_item_id on versions ve (cost=0.56..6.49 rows=1 width=25) (actual time=0.808..0.906 rows=1 loops=46,161)

  • Index Cond: (((item_type)::text = 'StockDistribution'::text) AND (item_id = sd.id))
  • Filter: ((whodunnit IS NOT NULL) AND (((event)::text = 'update'::text) OR ((event)::text = 'create'::text)) AND ((object_changes)::text ~~* '%saleable%'::text))
  • Rows Removed by Filter: 1
  • Buffers: shared hit=189,078 read=62,750
  • I/O Timings: read=40,164.321
59. 39.546 809.436 ↑ 1.2 137,895 1

Hash (cost=57,173.66..57,173.66 rows=164,863 width=16) (actual time=809.435..809.436 rows=137,895 loops=1)

  • Buckets: 131,072 Batches: 4 Memory Usage: 2,655kB
  • Buffers: shared hit=4,660 read=1,992, temp read=1,440 written=1,857
  • I/O Timings: read=195.170
60. 23.616 769.890 ↑ 1.2 137,895 1

Subquery Scan on transfers (cost=36,129.59..57,173.66 rows=164,863 width=16) (actual time=616.193..769.890 rows=137,895 loops=1)

  • Buffers: shared hit=4,660 read=1,992, temp read=1,440 written=1,404
  • I/O Timings: read=195.170
61. 45.644 746.274 ↑ 1.2 137,895 1

Finalize GroupAggregate (cost=36,129.59..55,525.03 rows=164,863 width=16) (actual time=616.191..746.274 rows=137,895 loops=1)

  • Group Key: sb_1.id
  • Buffers: shared hit=4,660 read=1,992, temp read=1,440 written=1,404
  • I/O Timings: read=195.170
62. 66.485 700.630 ↓ 1.1 147,419 1

Gather Merge (cost=36,129.59..53,189.47 rows=137,386 width=16) (actual time=616.181..700.630 rows=147,419 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
  • Buffers: shared hit=11,758 read=6,073, temp read=3,164 written=3,304
  • I/O Timings: read=568.008
63. 21.591 634.145 ↑ 1.4 49,140 3 / 3

Partial GroupAggregate (cost=35,129.57..36,331.69 rows=68,693 width=16) (actual time=603.555..634.145 rows=49,140 loops=3)

  • Group Key: sb_1.id
  • Buffers: shared hit=11,758 read=6,073, temp read=3,164 written=3,304
  • I/O Timings: read=568.008
64. 43.289 612.554 ↑ 1.2 55,159 3 / 3

Sort (cost=35,129.57..35,301.30 rows=68,693 width=16) (actual time=603.546..612.554 rows=55,159 loops=3)

  • Sort Key: sb_1.id
  • Sort Method: external merge Disk: 1,880kB
  • Worker 0: Sort Method: quicksort Memory: 3,828kB
  • Worker 1: Sort Method: quicksort Memory: 3,209kB
  • Buffers: shared hit=11,758 read=6,073, temp read=3,164 written=3,304
  • I/O Timings: read=568.008
65. 41.720 569.265 ↑ 1.2 55,159 3 / 3

Parallel Hash Join (cost=19,493.01..29,610.81 rows=68,693 width=16) (actual time=445.265..569.265 rows=55,159 loops=3)

  • Hash Cond: (sd_2.stock_batch_id = sb_1.id)
  • Buffers: shared hit=11,702 read=6,073, temp read=2,929 written=3,068
  • I/O Timings: read=568.008
66. 108.684 467.592 ↑ 1.2 55,159 3 / 3

Parallel Hash Join (cost=14,061.47..23,998.95 rows=68,693 width=16) (actual time=384.517..467.592 rows=55,159 loops=3)

  • Hash Cond: (st.source_stock_distribution_id = sd_2.id)
  • Buffers: shared hit=8,177 read=6,027, temp read=2,929 written=3,068
  • I/O Timings: read=509.633
67. 207.692 207.692 ↑ 1.2 55,159 3 / 3

Parallel Seq Scan on stock_transfers st (cost=0.00..8,028.16 rows=68,693 width=16) (actual time=0.467..207.692 rows=55,159 loops=3)

  • Filter: (((transfer_type)::text = 'Put-Away'::text) AND ((state)::text = 'transferred'::text))
  • Rows Removed by Filter: 49,872
  • Buffers: shared hit=40 read=6,027
  • I/O Timings: read=509.633
68. 78.272 151.216 ↑ 1.2 174,122 3 / 3

Parallel Hash (cost=10,300.32..10,300.32 rows=216,332 width=16) (actual time=151.215..151.216 rows=174,122 loops=3)

  • Buckets: 131,072 Batches: 16 Memory Usage: 2,624kB
  • Buffers: shared hit=8,137, temp written=2,240
69. 72.944 72.944 ↑ 1.2 174,122 3 / 3

Parallel Seq Scan on stock_distributions sd_2 (cost=0.00..10,300.32 rows=216,332 width=16) (actual time=0.009..72.944 rows=174,122 loops=3)

  • Buffers: shared hit=8,137
70. 24.412 59.953 ↑ 1.2 67,048 3 / 3

Parallel Hash (cost=4,389.02..4,389.02 rows=83,402 width=8) (actual time=59.953..59.953 rows=67,048 loops=3)

  • Buckets: 262,144 Batches: 1 Memory Usage: 9,952kB
  • Buffers: shared hit=3,509 read=46
  • I/O Timings: read=58.375
71. 35.541 35.541 ↑ 1.2 67,048 3 / 3

Parallel Seq Scan on stock_batches sb_1 (cost=0.00..4,389.02 rows=83,402 width=8) (actual time=0.006..35.541 rows=67,048 loops=3)

  • Buffers: shared hit=3,509 read=46
  • I/O Timings: read=58.375
72. 0.308 3.299 ↓ 1.0 1,648 1

Hash (cost=75.26..75.26 rows=1,626 width=31) (actual time=3.299..3.299 rows=1,648 loops=1)

  • Buckets: 2,048 Batches: 1 Memory Usage: 124kB
  • Buffers: shared hit=8 read=51
  • I/O Timings: read=2.630
73. 2.991 2.991 ↓ 1.0 1,648 1

Seq Scan on merchants m (cost=0.00..75.26 rows=1,626 width=31) (actual time=0.443..2.991 rows=1,648 loops=1)

  • Buffers: shared hit=8 read=51
  • I/O Timings: read=2.630