explain.depesz.com

PostgreSQL's explain analyze made readable

Result: cp6c

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 15.765 ↑ 1.0 1 1

GroupAggregate (cost=0.82..305.25 rows=1 width=40) (actual time=15.765..15.765 rows=1 loops=1)

  • Output: general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id, (sum(coverage_limit.amount))::bigint
  • Group Key: general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id
  • Buffers: shared hit=530
2. 0.017 15.749 ↓ 2.0 2 1

Nested Loop (cost=0.82..305.23 rows=1 width=40) (actual time=6.093..15.749 rows=2 loops=1)

  • Output: general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id, coverage_limit.amount
  • Join Filter: (coverage.id = coverage_limit.coverage_id)
  • Rows Removed by Join Filter: 62
  • Buffers: shared hit=530
3. 0.029 1.284 ↓ 2.0 2 1

Nested Loop (cost=0.82..63.53 rows=1 width=96) (actual time=1.112..1.284 rows=2 loops=1)

  • Output: general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id, line_business_coverage.coverage_id, coverage.id, coverage.endorsement_id, coverage.due_to_endorsement_id
  • Inner Unique: true
  • Join Filter: (line_business_coverage.coverage_id = coverage.id)
  • Rows Removed by Join Filter: 11
  • Buffers: shared hit=74
4. 0.008 1.101 ↓ 7.0 7 1

Nested Loop (cost=0.41..55.09 rows=1 width=80) (actual time=1.083..1.101 rows=7 loops=1)

  • Output: general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id, line_business_coverage.endorsement_id, line_business_coverage.due_to_endorsement_id, line_business_coverage.coverage_id
  • Buffers: shared hit=26
5. 1.062 1.062 ↑ 1.0 1 1

Seq Scan on reporting.endorsement_general_liability_line_business general_liability_line_business (cost=0.00..46.64 rows=1 width=48) (actual time=1.058..1.062 rows=1 loops=1)

  • Output: general_liability_line_business.id, general_liability_line_business.endorsement_id, general_liability_line_business.due_to_endorsement_id, general_liability_line_business.current_term_premium
  • Filter: ((general_liability_line_business.due_to_endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid) AND (general_liability_line_business.endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid))
  • Rows Removed by Filter: 1,657
  • Buffers: shared hit=19
6. 0.031 0.031 ↓ 7.0 7 1

Index Only Scan using endorsement_line_business_coverage_pkey on reporting.endorsement_line_business_coverage line_business_coverage (cost=0.41..8.43 rows=1 width=64) (actual time=0.019..0.031 rows=7 loops=1)

  • Output: line_business_coverage.line_business_id, line_business_coverage.endorsement_id, line_business_coverage.due_to_endorsement_id, line_business_coverage.coverage_id
  • Index Cond: ((line_business_coverage.line_business_id = general_liability_line_business.id) AND (line_business_coverage.endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid) AND (line_business_coverage.due_to_endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid))
  • Heap Fetches: 7
  • Buffers: shared hit=7
7. 0.154 0.154 ↓ 2.0 2 7

Index Scan using endorsement_coverage_endorsement_id_due_to_endorsement_id on reporting.endorsement_coverage coverage (cost=0.41..8.43 rows=1 width=48) (actual time=0.020..0.022 rows=2 loops=7)

  • Output: coverage.id, coverage.endorsement_id, coverage.due_to_endorsement_id, coverage.coverage_code, coverage.description, coverage.current_term_premium, coverage.rate, coverage.coverage_option_code
  • Index Cond: ((coverage.endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid) AND (coverage.due_to_endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid))
  • Filter: ((coverage.coverage_code)::text = ANY ('{EAOCC,MEDEX}'::text[]))
  • Rows Removed by Filter: 30
  • Buffers: shared hit=48
8. 14.448 14.448 ↓ 32.0 32 2

Seq Scan on reporting.endorsement_coverage_limit coverage_limit (cost=0.00..241.68 rows=1 width=56) (actual time=7.143..7.224 rows=32 loops=2)

  • Output: coverage_limit.amount, coverage_limit.coverage_id, coverage_limit.endorsement_id, coverage_limit.due_to_endorsement_id
  • Filter: ((coverage_limit.due_to_endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid) AND (coverage_limit.endorsement_id = '5ef9df46-e33b-40a8-999a-53e77a058990'::uuid))
  • Rows Removed by Filter: 16,246
  • Buffers: shared hit=456
Planning time : 2.910 ms
Execution time : 15.822 ms