explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 4gpm

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 43.486 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,155.31..1,251.79 rows=1 width=369) (actual time=43.486..43.486 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
2. 0.001 43.486 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,155.03..1,251.43 rows=1 width=345) (actual time=43.486..43.486 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
3. 0.000 43.485 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,154.73..1,250.94 rows=1 width=345) (actual time=43.485..43.485 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
4. 0.001 43.485 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,154.46..1,250.63 rows=1 width=343) (actual time=43.485..43.485 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
5. 0.002 43.484 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,154.31..1,250.46 rows=1 width=337) (actual time=43.484..43.484 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
6. 0.001 43.482 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,154.17..1,250.29 rows=1 width=332) (actual time=43.482..43.482 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
7. 0.000 43.481 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,153.89..1,249.98 rows=1 width=298) (actual time=43.481..43.481 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
8. 0.001 43.481 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,153.62..1,249.66 rows=1 width=264) (actual time=43.481..43.481 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
9. 0.000 43.480 ↓ 0.0 0 1

Nested Loop Left Join (cost=1,153.34..1,249.33 rows=1 width=262) (actual time=43.480..43.480 rows=0 loops=1)

  • Buffers: shared hit=1065 read=18
10. 0.048 43.480 ↓ 0.0 0 1

Hash Right Join (cost=1,153.05..1,248.93 rows=1 width=239) (actual time=43.480..43.480 rows=0 loops=1)

  • Hash Cond: (cps.ticket_id = pt.id)
  • Buffers: shared hit=1065 read=18
11. 0.000 0.000 ↓ 0.0 0

Seq Scan on policy_surrender cps (cost=0.00..82.82 rows=3,482 width=68) (never executed)

12. 0.000 43.432 ↓ 0.0 0 1

Hash (cost=1,153.03..1,153.03 rows=1 width=179) (actual time=43.432..43.432 rows=0 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 0kB
  • Buffers: shared hit=1062 read=18
13. 0.001 43.432 ↓ 0.0 0 1

Nested Loop Left Join (cost=24.76..1,153.03 rows=1 width=179) (actual time=43.432..43.432 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
14. 0.001 43.431 ↓ 0.0 0 1

Nested Loop Left Join (cost=24.34..1,152.19 rows=1 width=179) (actual time=43.431..43.431 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
15. 0.001 43.430 ↓ 0.0 0 1

Nested Loop Left Join (cost=24.06..1,151.88 rows=1 width=171) (actual time=43.430..43.430 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
16. 0.001 43.429 ↓ 0.0 0 1

Nested Loop Left Join (cost=23.77..1,143.78 rows=1 width=159) (actual time=43.429..43.429 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
17. 0.001 43.428 ↓ 0.0 0 1

Nested Loop (cost=23.49..1,136.52 rows=1 width=134) (actual time=43.428..43.428 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
18. 0.000 43.427 ↓ 0.0 0 1

Nested Loop (cost=23.19..1,128.40 rows=1 width=58) (actual time=43.427..43.427 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
19. 0.017 43.427 ↓ 0.0 0 1

Nested Loop (cost=22.92..1,126.09 rows=1 width=24) (actual time=43.427..43.427 rows=0 loops=1)

  • Buffers: shared hit=1062 read=18
20. 22.853 22.853 ↑ 1.0 1 1

Index Scan using dictionary_item_code_idx on dictionary_item dt (cost=0.28..8.29 rows=1 width=4) (actual time=22.849..22.853 rows=1 loops=1)

  • Index Cond: ((code)::text = 'RESIGNATION'::text)
  • Buffers: shared read=3
21. 8.633 20.557 ↓ 0.0 0 1

Bitmap Heap Scan on policy_ticket pt (cost=22.64..1,117.76 rows=4 width=28) (actual time=20.557..20.557 rows=0 loops=1)

  • Recheck Cond: (operation_id = dt.id)
  • Filter: (((status_date)::date >= '2019-05-01'::date) AND ((status_date)::date <= '2019-05-31'::date))
  • Rows Removed by Filter: 3816
  • Buffers: shared hit=1062 read=15
22. 11.924 11.924 ↓ 4.5 3,816 1

Bitmap Index Scan on policy_ticket_operation_id_idx (cost=0.00..22.64 rows=848 width=0) (actual time=11.924..11.924 rows=3,816 loops=1)

  • Index Cond: (operation_id = dt.id)
  • Buffers: shared read=15
23. 0.000 0.000 ↓ 0.0 0

Index Scan using dictionary_item_id_idx on dictionary_item dstat (cost=0.28..2.30 rows=1 width=42) (never executed)

  • Index Cond: (id = pt.status_id)
  • Filter: (((code)::text ~~ '9%'::text) AND ((code)::text ~~ '9%'::text))
24. 0.000 0.000 ↓ 0.0 0

Index Scan using policy_header_id_idx on policy_header ph (cost=0.29..8.10 rows=1 width=76) (never executed)

  • Index Cond: (id = pt.policy_id)
  • Filter: (company_id = 60)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using system_user_id_idx on system_user author (cost=0.29..7.25 rows=1 width=33) (never executed)

  • Index Cond: (id = pt.registerby_id)
26. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_rep_pol_header on policy_header bph (cost=0.29..8.10 rows=1 width=20) (never executed)

  • Index Cond: (id = pt.policy_id)
27. 0.000 0.000 ↓ 0.0 0

Index Scan using dictionary_item_id_idx on dictionary_item dcompany (cost=0.28..0.30 rows=1 width=16) (never executed)

  • Index Cond: ((id = ph.company_id) AND (id = 60))
28. 0.000 0.000 ↓ 0.0 0

Index Scan using policy_person_insurance_document_id_idx on policy_person pp (cost=0.42..0.83 rows=1 width=8) (never executed)

  • Index Cond: (insurance_document_id = ph.id)
  • Filter: ((type)::text = 'OWNER'::text)
29. 0.000 0.000 ↓ 0.0 0

Index Scan using person_uid_idx on person owner (cost=0.29..0.39 rows=1 width=31) (never executed)

  • Index Cond: (uid = pp.person_uid)
30. 0.000 0.000 ↓ 0.0 0

Index Scan using partner_branch_id_idx on partner_branch sur_bra (cost=0.28..0.32 rows=1 width=10) (never executed)

  • Index Cond: (cps.branch_id = id)
31. 0.000 0.000 ↓ 0.0 0

Index Scan using dictionary_item_id_idx on dictionary_item dreason (cost=0.28..0.31 rows=1 width=42) (never executed)

  • Index Cond: (id = cps.reason_id)
32. 0.000 0.000 ↓ 0.0 0

Index Scan using dictionary_item_id_idx on dictionary_item dfrequency (cost=0.28..0.29 rows=1 width=42) (never executed)

  • Index Cond: (id = ph.frequency_id)
33. 0.000 0.000 ↓ 0.0 0

Index Scan using product_header_id_idx on product_header pty (cost=0.14..0.16 rows=1 width=13) (never executed)

  • Index Cond: (id = ph.product_id)
34. 0.000 0.000 ↓ 0.0 0

Index Scan using aggregated_policy_id_idx on aggregated_policy ag (cost=0.15..0.17 rows=1 width=14) (never executed)

  • Index Cond: (id = ph.aggregated_policy_id)
35. 0.000 0.000 ↓ 0.0 0

Index Scan using partner_branch_id_idx on partner_branch branch (cost=0.28..0.30 rows=1 width=10) (never executed)

  • Index Cond: (id = ph.branch_id)
36. 0.000 0.000 ↓ 0.0 0

Index Scan using offer_cpi_id_idx on offer_cpi offe (cost=0.29..0.48 rows=1 width=8) (never executed)

  • Index Cond: (ph.offer_id = id)
37. 0.000 0.000 ↓ 0.0 0

Index Scan using system_user_id_idx on system_user sof (cost=0.29..0.34 rows=1 width=32) (never executed)