explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 3qhU

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 118,676.961 ↓ 0.0 0 1

Sort (cost=7,871,846.79..7,884,975.27 rows=5,251,391 width=62) (actual time=118,676.961..118,676.961 rows=0 loops=1)

  • Sort Key: cp.number
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=115,476,892 read=141,188, temp read=507,680 written=508,280
2. 0.003 118,676.933 ↓ 0.0 0 1

GroupAggregate (cost=6,776,180.54..7,170,034.89 rows=5,251,391 width=62) (actual time=118,676.933..118,676.933 rows=0 loops=1)

  • Group Key: cp.uuid
  • Filter: (count(DISTINCT ccp.uuid) > 0)
  • Buffers: shared hit=115,476,892 read=141,188, temp read=507,680 written=508,280
3. 0.008 118,676.930 ↓ 0.0 0 1

Sort (cost=6,776,180.54..6,815,565.97 rows=15,754,174 width=56) (actual time=118,676.930..118,676.930 rows=0 loops=1)

  • Sort Key: cp.uuid
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=115,476,892 read=141,188, temp read=507,680 written=508,280
4. 0.271 118,676.922 ↓ 0.0 0 1

Hash Join (cost=2,844,262.88..4,577,437.13 rows=15,754,174 width=56) (actual time=118,676.922..118,676.922 rows=0 loops=1)

  • Hash Cond: ((c.warehouse_code)::text = cw.code)
  • Buffers: shared hit=115,476,892 read=141,188, temp read=507,680 written=508,280
5. 0.000 118,671.893 ↑ 13,063.5 755 1

Hash Left Join (cost=2,843,979.80..4,357,970.50 rows=9,862,920 width=60) (actual time=84,430.609..118,671.893 rows=755 loops=1)

  • Hash Cond: ((cargo_place_history.current_warehouse)::text = warehouse.code)
  • Buffers: shared hit=115,476,778 read=141,188, temp read=507,680 written=508,280
6. 617.789 119,283.160 ↑ 8,796.1 755 1

Gather (cost=2,843,696.72..4,217,548.44 rows=6,641,023 width=64) (actual time=84,425.895..119,283.160 rows=755 loops=1)

  • Workers Planned: 2
  • Workers Launched: 0
  • Buffers: shared hit=115,476,778 read=141,074, temp read=507,680 written=508,280
7. 34,273.155 118,665.371 ↑ 3,665.0 755 1

Parallel Hash Left Join (cost=2,842,696.72..3,552,446.14 rows=2,767,093 width=64) (actual time=84,424.767..118,665.371 rows=755 loops=1)

  • Hash Cond: (dcpl.cargo_place_uuid = ccp.uuid)
  • Buffers: shared hit=115,476,778 read=141,074, temp read=507,680 written=508,280
8. 0.691 2,641.130 ↑ 3,665.0 755 1

Nested Loop Left Join (cost=2.56..383,537.36 rows=2,767,093 width=64) (actual time=89.808..2,641.130 rows=755 loops=1)

  • Buffers: shared hit=165 read=6,715
9. 0.229 1,425.655 ↑ 153.2 24 1

Nested Loop (cost=1.99..47,680.40 rows=3,676 width=64) (actual time=66.411..1,425.655 rows=24 loops=1)

  • Buffers: shared hit=133 read=6,619
10. 0.295 721.601 ↑ 107.4 25 1

Nested Loop (cost=1.43..42,977.23 rows=2,685 width=70) (actual time=54.531..721.601 rows=25 loops=1)

  • Buffers: shared hit=84 read=6,560
11. 0.320 687.681 ↑ 107.4 25 1

Nested Loop (cost=0.86..35,738.05 rows=2,685 width=56) (actual time=52.681..687.681 rows=25 loops=1)

  • Buffers: shared hit=26 read=6,493
12. 305.261 305.261 ↑ 107.4 25 1

Parallel Index Scan using cargo_place_history_idx_deleted_complited_document_type_is_last on cargo_place_history (cost=0.43..28,791.23 rows=2,685 width=20) (actual time=45.623..305.261 rows=25 loops=1)

  • Index Cond: (((current_branch)::text = '270'::text) AND ((next_branch)::text = '44'::text) AND (is_last = true))
  • Filter: is_last
  • Buffers: shared read=6,419
13. 382.100 382.100 ↑ 1.0 1 25

Index Scan using document_consolidation_cp_idx on document_consolidation c (cost=0.43..2.58 rows=1 width=36) (actual time=15.281..15.284 rows=1 loops=25)

  • Index Cond: (cargo_place_uuid = cargo_place_history.cargo_place_uuid)
  • Buffers: shared hit=26 read=74
14. 33.625 33.625 ↑ 1.0 1 25

Index Scan using cargo_place_pkey on cargo_place cp (cost=0.57..2.70 rows=1 width=46) (actual time=1.345..1.345 rows=1 loops=25)

  • Index Cond: (uuid = c.cargo_place_uuid)
  • Buffers: shared hit=58 read=67
15. 703.825 703.825 ↑ 5.0 1 25

Index Only Scan using document_seal_lnk_index_document_seal_number on document_seal_lnk ds (cost=0.56..1.70 rows=5 width=26) (actual time=28.152..28.153 rows=1 loops=25)

  • Index Cond: (document_uuid = c.uuid)
  • Heap Fetches: 0
  • Buffers: shared hit=49 read=59
16. 1,214.784 1,214.784 ↑ 79.2 31 24

Index Only Scan using document_cargo_place_lnk_document_uuid_cargo_place_uuid_key on document_cargo_place_lnk dcpl (cost=0.57..66.81 rows=2,455 width=32) (actual time=45.310..50.616 rows=31 loops=24)

  • Index Cond: (document_uuid = cp.document_id)
  • Heap Fetches: 0
  • Buffers: shared hit=32 read=96
17. 23,842.613 81,751.086 ↓ 2.2 116,235,970 1

Parallel Hash (cost=1,918,872.91..1,918,872.91 rows=53,145,620 width=16) (actual time=81,751.086..81,751.086 rows=116,235,970 loops=1)

  • Buckets: 2,097,152 Batches: 128 Memory Usage: 59,136kB
  • Buffers: shared hit=115,476,613 read=134,359, temp written=507,768
18. 57,908.473 57,908.473 ↓ 2.2 116,235,970 1

Parallel Index Only Scan using cargo_place_pkey on cargo_place ccp (cost=0.57..1,918,872.91 rows=53,145,620 width=16) (actual time=0.015..57,908.473 rows=116,235,970 loops=1)

  • Heap Fetches: 0
  • Buffers: shared hit=115,476,613 read=134,359
19. 1.220 4.671 ↓ 1.1 7,465 1

Hash (cost=198.48..198.48 rows=6,768 width=4) (actual time=4.670..4.671 rows=7,465 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 334kB
  • Buffers: shared read=114
20. 3.451 3.451 ↓ 1.1 7,465 1

Seq Scan on warehouse (cost=0.00..198.48 rows=6,768 width=4) (actual time=0.426..3.451 rows=7,465 loops=1)

  • Filter: active
  • Rows Removed by Filter: 1,850
  • Buffers: shared read=114
21. 1.976 4.758 ↓ 1.1 7,465 1

Hash (cost=198.48..198.48 rows=6,768 width=4) (actual time=4.758..4.758 rows=7,465 loops=1)

  • Buckets: 8,192 Batches: 1 Memory Usage: 334kB
  • Buffers: shared hit=114
22. 2.782 2.782 ↓ 1.1 7,465 1

Seq Scan on warehouse cw (cost=0.00..198.48 rows=6,768 width=4) (actual time=0.024..2.782 rows=7,465 loops=1)

  • Filter: active
  • Rows Removed by Filter: 1,850
  • Buffers: shared hit=114
Planning time : 14.401 ms
Execution time : 119,294.035 ms