explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0rb4

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 0.042 ↓ 0.0 0 1

Subquery Scan on foo (cost=2,075.63..2,776,665.60 rows=700 width=58) (actual time=0.042..0.042 rows=0 loops=1)

  • Filter: ((SubPlan 1) OR (SubPlan 2))
2. 0.008 0.041 ↓ 0.0 0 1

HashAggregate (cost=2,075.63..2,087.30 rows=933 width=117) (actual time=0.041..0.041 rows=0 loops=1)

  • Group Key: rxa.file_name, rsd.claim_id, rsd.payment_reference, rxa.record_count
3. 0.000 0.033 ↓ 0.0 0 1

Nested Loop (cost=0.98..2,063.97 rows=933 width=89) (actual time=0.033..0.033 rows=0 loops=1)

4. 0.033 0.033 ↓ 0.0 0 1

Index Scan using file_id_unique on ra_xml_file rxa (cost=0.42..8.45 rows=1 width=77) (actual time=0.033..0.033 rows=0 loops=1)

  • Index Cond: ((file_id)::text = 'T00000000001039'::text)
  • Filter: ((is_recovery = 'Y'::bpchar) AND ((created_by)::text = 'ETL'::text))
  • Rows Removed by Filter: 1
5. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_ra_stg_detials_file_id on ra_stg_details rsd (cost=0.56..2,046.20 rows=933 width=42) (never executed)

  • Index Cond: ((file_id)::text = 'T00000000001039'::text)
6.          

SubPlan (for Subquery Scan)

7. 0.000 0.000 ↓ 0.0 0

Subquery Scan on f (cost=129.99..130.02 rows=1 width=0) (never executed)

8. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=129.99..130.01 rows=1 width=50) (never executed)

  • Group Key: ipa.remittance_id, ipa.claim_id
  • Filter: (sum(ipa.amount) = foo.amount)
9. 0.000 0.000 ↓ 0.0 0

Sort (cost=129.99..129.99 rows=1 width=22) (never executed)

  • Sort Key: ipa.remittance_id
10. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=1.55..129.98 rows=1 width=22) (never executed)

11. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..21.05 rows=1 width=8) (never executed)

12. 0.000 0.000 ↓ 0.0 0

Index Scan using insurance_claim_remittance_claim_id on insurance_claim_remittance icr (cost=0.56..12.60 rows=1 width=4) (never executed)

  • Index Cond: ((claim_id)::text = (foo.claim_id)::text)
  • Filter: ((payment_reference)::text = (foo.payment_reference)::text)
13. 0.000 0.000 ↓ 0.0 0

Index Scan using insurance_remittance_pkey on insurance_remittance ir (cost=0.42..8.45 rows=1 width=4) (never executed)

  • Index Cond: (remittance_id = icr.remittance_id)
  • Filter: ((job_status = ANY ('{S,C}'::bpchar[])) AND (is_recovery = 'Y'::bpchar))
14. 0.000 0.000 ↓ 0.0 0

Index Scan using insurance_payment_allocation_remittance_id_index on insurance_payment_allocation ipa (cost=0.56..108.92 rows=1 width=22) (never executed)

  • Index Cond: (remittance_id = ir.remittance_id)
  • Filter: (((claim_id)::text = (foo.claim_id)::text) AND ((payment_reference)::text = (foo.payment_reference)::text))
15. 0.000 0.000 ↓ 0.0 0

Subquery Scan on ifoo (cost=2,843.75..2,843.79 rows=1 width=0) (never executed)

16. 0.000 0.000 ↓ 0.0 0

GroupAggregate (cost=2,843.75..2,843.78 rows=1 width=116) (never executed)

  • Group Key: rxf.file_name, rsd_1.claim_id, rxf.payment_reference, rxf.record_count
  • Filter: (sum(rsd_1.payment_amount) = foo.amount)
17. 0.000 0.000 ↓ 0.0 0

Sort (cost=2,843.75..2,843.76 rows=1 width=88) (never executed)

  • Sort Key: rxf.file_name
18. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.98..2,843.74 rows=1 width=88) (never executed)

19. 0.000 0.000 ↓ 0.0 0

Index Scan using idx_ra_stg_details_claim_id_idx on ra_stg_details rsd_1 (cost=0.56..916.74 rows=229 width=33) (never executed)

  • Index Cond: ((foo.claim_id)::text = (claim_id)::text)
20. 0.000 0.000 ↓ 0.0 0

Index Scan using file_id_unique on ra_xml_file rxf (cost=0.42..8.38 rows=1 width=85) (never executed)

  • Index Cond: ((file_id)::text = (rsd_1.file_id)::text)
  • Filter: ((status = 'V'::bpchar) AND ((payment_reference)::text = (foo.payment_reference)::text) AND (is_recovery = 'Y'::bpchar) AND (foo.record_count = record_count))
Planning time : 7.014 ms
Execution time : 0.237 ms