explain.depesz.com

PostgreSQL's explain analyze made readable

Result: EGM1

Settings
# exclusive inclusive rows x rows loops node
1. 588.426 26,538.025 ↑ 1.0 16,006 1

Nested Loop Left Join (cost=70.55..1,131,819.04 rows=16,051 width=1,453) (actual time=1,053.117..26,538.025 rows=16,006 loops=1)

  • Functions: 72
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 11.574 ms, Inlining 14.150 ms, Optimization 618.907 ms, Emission 416.774 ms, Total 1061.406 ms
2. 570.810 20,411.523 ↑ 1.0 16,006 1

Nested Loop Left Join (cost=53.79..862,242.50 rows=16,051 width=1,433) (actual time=1,052.709..20,411.523 rows=16,006 loops=1)

3. 468.547 11,501.587 ↑ 1.0 16,006 1

Merge Join (cost=36.89..590,418.81 rows=16,051 width=1,425) (actual time=1,052.054..11,501.587 rows=16,006 loops=1)

  • Merge Cond: ((endorsement.id = endorsement_insured.endorsement_id) AND (endorsement.due_to_endorsement_id = endorsement_insured.due_to_endorsement_id))
4. 587.179 10,844.741 ↑ 1.0 16,006 1

Nested Loop (cost=36.60..588,294.49 rows=16,051 width=1,425) (actual time=1,051.998..10,844.741 rows=16,006 loops=1)

5. 463.566 2,601.235 ↑ 1.0 16,051 1

Nested Loop (cost=0.86..3,236.77 rows=16,051 width=1,242) (actual time=1,051.423..2,601.235 rows=16,051 loops=1)

6. 1,525.012 1,899.599 ↓ 17,005.0 17,005 1

Merge Join (cost=0.57..3,236.35 rows=1 width=625) (actual time=1,051.341..1,899.599 rows=17,005 loops=1)

  • Merge Cond: ((endorsement_carrier.endorsement_id = endorsement_agency.endorsement_id) AND (endorsement_carrier.due_to_endorsement_id = endorsement_agency.due_to_endorsement_id))
7. 188.001 188.001 ↑ 1.0 17,005 1

Index Scan using endorsement_carrier_endorsement_id_due_to_endorsement_id_idx on endorsement_carrier (cost=0.29..1,507.15 rows=17,005 width=567) (actual time=0.025..188.001 rows=17,005 loops=1)

8. 186.586 186.586 ↑ 1.0 17,005 1

Index Scan using endorsement_agency_endorsement_id_due_to_endorsement_id_idx on endorsement_agency (cost=0.29..1,559.14 rows=17,005 width=58) (actual time=0.126..186.586 rows=17,005 loops=1)

9. 238.070 238.070 ↑ 1.0 1 17,005

Index Scan using endorsement_pkey on endorsement (cost=0.29..0.43 rows=1 width=617) (actual time=0.014..0.014 rows=1 loops=17,005)

  • Index Cond: ((id = endorsement_carrier.endorsement_id) AND (due_to_endorsement_id = endorsement_carrier.due_to_endorsement_id))
  • Filter: (NOT admitted)
  • Rows Removed by Filter: 0
10. 1,540.896 7,656.327 ↑ 1.0 1 16,051

GroupAggregate (cost=35.74..36.43 rows=1 width=183) (actual time=0.469..0.477 rows=1 loops=16,051)

  • Group Key: endorsement_invoice.number
11. 2,038.477 6,115.431 ↑ 1.0 6 16,051

Sort (cost=35.74..35.76 rows=6 width=30) (actual time=0.329..0.381 rows=6 loops=16,051)

  • Sort Key: endorsement_invoice.number
  • Sort Method: quicksort Memory: 25kB
12. 2,283.069 4,076.954 ↑ 1.0 6 16,051

Nested Loop (cost=4.75..35.66 rows=6 width=30) (actual time=0.081..0.254 rows=6 loops=16,051)

13. 369.173 369.173 ↑ 1.0 1 16,051

Index Scan using endorsement_invoice_endorsement_id_due_to_endorsement_id_idx on endorsement_invoice (cost=0.29..8.31 rows=1 width=23) (actual time=0.014..0.023 rows=1 loops=16,051)

  • Index Cond: ((endorsement_id = endorsement.id) AND (due_to_endorsement_id = endorsement.due_to_endorsement_id))
14. 1,184.592 1,424.712 ↑ 1.0 6 16,008

Bitmap Heap Scan on endorsement_invoice_line_item (cost=4.46..27.30 rows=6 width=39) (actual time=0.036..0.089 rows=6 loops=16,008)

  • Recheck Cond: (invoice_id = endorsement_invoice.id)
  • Heap Blocks: exact=18,992
15. 240.120 240.120 ↑ 1.0 6 16,008

Bitmap Index Scan on endorsement_invoice_line_item_invoice_id_idx (cost=0.00..4.46 rows=6 width=0) (actual time=0.015..0.015 rows=6 loops=16,008)

  • Index Cond: (invoice_id = endorsement_invoice.id)
16. 188.299 188.299 ↑ 1.0 17,005 1

Index Scan using endorsement_insured_endorsement_id_due_to_endorsement_id_idx on endorsement_insured (cost=0.29..1,959.03 rows=17,005 width=96) (actual time=0.021..188.299 rows=17,005 loops=1)

17. 1,248.468 8,339.126 ↑ 1.0 1 16,006

Aggregate (cost=16.90..16.92 rows=1 width=8) (actual time=0.512..0.521 rows=1 loops=16,006)

18. 3,729.119 7,090.658 ↓ 6.0 6 16,006

Nested Loop (cost=0.83..16.89 rows=1 width=13) (actual time=0.062..0.443 rows=6 loops=16,006)

19. 1,200.450 1,200.450 ↓ 6.0 6 16,006

Index Scan using endorsement_coverage_endorsement_id_due_to_endorsement_id_idx on endorsement_coverage (cost=0.42..8.44 rows=1 width=53) (actual time=0.015..0.075 rows=6 loops=16,006)

  • Index Cond: ((endorsement_id = endorsement.id) AND (due_to_endorsement_id = endorsement.due_to_endorsement_id))
20. 2,161.089 2,161.089 ↑ 1.0 1 102,909

Index Scan using endorsement_coverage_limit_coverage_id_endorsement_id_due_t_idx on endorsement_coverage_limit (cost=0.42..8.44 rows=1 width=56) (actual time=0.013..0.021 rows=1 loops=102,909)

  • Index Cond: ((coverage_id = endorsement_coverage.id) AND (endorsement_id = endorsement.id) AND (due_to_endorsement_id = endorsement.due_to_endorsement_id))
21. 576.216 5,538.076 ↑ 1.0 1 16,006

Aggregate (cost=16.76..16.77 rows=1 width=8) (actual time=0.337..0.346 rows=1 loops=16,006)

22. 2,352.696 4,961.860 ↑ 1.0 1 16,006

Nested Loop (cost=0.70..16.75 rows=1 width=8) (actual time=0.161..0.310 rows=1 loops=16,006)

23. 1,168.438 1,168.438 ↓ 6.0 6 16,006

Index Scan using endorsement_coverage_endorsement_id_due_to_endorsement_id_idx on endorsement_coverage endorsement_coverage_1 (cost=0.42..8.44 rows=1 width=48) (actual time=0.013..0.073 rows=6 loops=16,006)

  • Index Cond: ((endorsement_id = endorsement.id) AND (due_to_endorsement_id = endorsement.due_to_endorsement_id))
24. 1,440.726 1,440.726 ↓ 0.0 0 102,909

Index Scan using endorsement_coverage_deductib_coverage_id_endorsement_id_du_idx on endorsement_coverage_deductible (cost=0.29..8.31 rows=1 width=56) (actual time=0.012..0.014 rows=0 loops=102,909)

  • Index Cond: ((coverage_id = endorsement_coverage_1.id) AND (endorsement_id = endorsement.id) AND (due_to_endorsement_id = endorsement.due_to_endorsement_id))
Execution time : 26,688.677 ms