explain.depesz.com

PostgreSQL's explain analyze made readable

Result: E7Ou

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 422.283 ↑ 1.0 1 1

Nested Loop (cost=119,772.97..119,800.01 rows=1 width=73) (actual time=422.279..422.283 rows=1 loops=1)

2.          

CTE pair

3. 0.002 422.147 ↑ 2.0 1 1

Unique (cost=119,770.54..119,770.55 rows=2 width=64) (actual time=422.146..422.147 rows=1 loops=1)

4. 0.013 422.145 ↑ 1.0 2 1

Sort (cost=119,770.54..119,770.54 rows=2 width=64) (actual time=422.145..422.145 rows=2 loops=1)

  • Sort Key: d.bo_document_fkey, d.id
  • Sort Method: quicksort Memory: 25kB
5. 0.000 422.132 ↑ 1.0 2 1

Append (cost=0.86..119,770.53 rows=2 width=64) (actual time=0.034..422.132 rows=2 loops=1)

6. 0.003 0.035 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.86..6.91 rows=1 width=19) (actual time=0.033..0.035 rows=1 loops=1)

7. 0.018 0.018 ↑ 1.0 1 1

Index Scan using bo_contract_hardwood_deal__bo_document_fkey on bo_contract_hardwood_deal d (cost=0.43..4.45 rows=1 width=28) (actual time=0.017..0.018 rows=1 loops=1)

  • Index Cond: ((bo_document_fkey)::text = 'P_1349840'::text)
8. 0.014 0.014 ↑ 1.0 1 1

Index Only Scan using bo_contract_hardwood_deal_220_parent_fkey_id on bo_contract_hardwood_deal d2 (cost=0.43..2.45 rows=1 width=9) (actual time=0.013..0.014 rows=1 loops=1)

  • Index Cond: (parent_fkey = (d.deal_pair_fkey)::text)
  • Heap Fetches: 0
9. 17.418 435.483 ↑ 1.0 1 1

Gather (cost=1,004.46..119,763.60 rows=1 width=19) (actual time=421.998..435.483 rows=1 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
10. 251.365 418.065 ↓ 0.0 0 3 / 3

Hash Join (cost=4.46..118,763.50 rows=1 width=19) (actual time=285.460..418.065 rows=0 loops=3)

  • Hash Cond: ((d_1.deal_pair_fkey)::text = (d2_1.parent_fkey)::text)
11. 166.667 166.667 ↑ 1.3 1,278,198 3 / 3

Parallel Seq Scan on bo_contract_hardwood_deal d_1 (cost=0.00..112,767.48 rows=1,597,748 width=28) (actual time=1.540..166.667 rows=1,278,198 loops=3)

12. 0.006 0.033 ↑ 1.0 1 3 / 3

Hash (cost=4.45..4.45 rows=1 width=9) (actual time=0.033..0.033 rows=1 loops=3)

  • Buckets: 1,024 Batches: 1 Memory Usage: 9kB
13. 0.027 0.027 ↑ 1.0 1 3 / 3

Index Scan using bo_contract_hardwood_deal__bo_document_fkey on bo_contract_hardwood_deal d2_1 (cost=0.43..4.45 rows=1 width=9) (actual time=0.026..0.027 rows=1 loops=3)

  • Index Cond: ((bo_document_fkey)::text = 'P_1349840'::text)
14. 0.008 422.260 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.98..26.69 rows=1 width=36) (actual time=422.257..422.260 rows=1 loops=1)

  • Filter: ((base.status = 2) OR (pair_base.status = 2))
15. 0.004 422.215 ↑ 2.0 1 1

Nested Loop (cost=0.99..15.04 rows=2 width=31) (actual time=422.212..422.215 rows=1 loops=1)

16. 0.006 422.189 ↑ 2.0 1 1

Nested Loop (cost=0.43..8.94 rows=2 width=37) (actual time=422.187..422.189 rows=1 loops=1)

17. 422.150 422.150 ↑ 2.0 1 1

CTE Scan on pair (cost=0.00..0.04 rows=2 width=32) (actual time=422.147..422.150 rows=1 loops=1)

18. 0.033 0.033 ↑ 1.0 1 1

Index Scan using bo_contract_hardwood_deal_pkey on bo_contract_hardwood_deal (cost=0.43..4.45 rows=1 width=37) (actual time=0.033..0.033 rows=1 loops=1)

  • Index Cond: ((id)::text = (pair.deal_id)::text)
  • Filter: actual
19. 0.022 0.022 ↑ 1.0 1 1

Index Only Scan using bo_document_base_id_status_idx on bo_document_base base (cost=0.56..3.05 rows=1 width=14) (actual time=0.022..0.022 rows=1 loops=1)

  • Index Cond: (id = (bo_contract_hardwood_deal.bo_document_fkey)::text)
  • Heap Fetches: 1
20. 0.004 0.037 ↑ 1.0 1 1

Nested Loop Left Join (cost=0.99..5.81 rows=1 width=23) (actual time=0.036..0.037 rows=1 loops=1)

21. 0.013 0.013 ↑ 1.0 1 1

Index Scan using bo_contract_hardwood_deal_220_parent_fkey_id on bo_contract_hardwood_deal bo_contract_hardwood_deal_1 (cost=0.43..2.76 rows=1 width=29) (actual time=0.013..0.013 rows=1 loops=1)

  • Index Cond: ((bo_contract_hardwood_deal.deal_pair_fkey)::text = (parent_fkey)::text)
  • Filter: actual
22. 0.020 0.020 ↑ 1.0 1 1

Index Only Scan using bo_document_base_id_status_idx on bo_document_base pair_base (cost=0.56..3.05 rows=1 width=14) (actual time=0.020..0.020 rows=1 loops=1)

  • Index Cond: (id = (bo_contract_hardwood_deal_1.bo_document_fkey)::text)
  • Heap Fetches: 1
23. 0.016 0.016 ↑ 1.0 1 1

Index Only Scan using bo_party_pkey on bo_party seller (cost=0.43..2.76 rows=1 width=10) (actual time=0.016..0.016 rows=1 loops=1)

  • Index Cond: (id = (bo_contract_hardwood_deal.bo_party_seller_fkey)::text)
  • Heap Fetches: 1
Planning time : 107.535 ms
Execution time : 435.831 ms