explain.depesz.com

PostgreSQL's explain analyze made readable

Result: RIRG : Invoice Tasks - Ready for Release

Settings
# exclusive inclusive rows x rows loops node
1. 0.881 237.259 ↑ 2.8 63 1

HashAggregate (cost=283,273.44..283,275.22 rows=178 width=112) (actual time=237.246..237.259 rows=63 loops=1)

  • Group Key: ecgps_core_study.id, ecgps_core_study.study_name, ecgps_core_study.protocol, ecgps_core_study.slug
2. 0.562 236.378 ↓ 4.6 811 1

Nested Loop (cost=7.44..283,271.21 rows=178 width=112) (actual time=0.111..236.378 rows=811 loops=1)

3. 0.735 230.139 ↓ 4.6 811 1

Nested Loop (cost=6.89..283,074.12 rows=178 width=66) (actual time=0.1..230.139 rows=811 loops=1)

4. 0.026 225.349 ↓ 4.6 811 1

Nested Loop (cost=6.47..282,394 rows=178 width=66) (actual time=0.093..225.349 rows=811 loops=1)

5. 1.986 7.997 ↓ 2.0 2,498 1

Nested Loop (cost=0.42..2,125.55 rows=1,228 width=66) (actual time=0.043..7.997 rows=2,498 loops=1)

6. 0.005 0.005 ↑ 1.0 1 1

Seq Scan on ecgps_core_paymentexecutiontype ecgps_core_paymentexecutiontype (cost=0..1.02 rows=1 width=33) (actual time=0.004..0.005 rows=1 loops=1)

  • Filter: ((short_name)::text = 'wells_fargo'::text)
7. 6.006 6.006 ↓ 1.1 2,591 1

Index Scan using idx_invoice_invoicestatus on ecgps_core_invoice ecgps_core_invoice (cost=0.42..2,093.84 rows=2,455 width=99) (actual time=0.036..6.006 rows=2,591 loops=1)

  • Index Cond: ((invoice_status)::text = 'approved'::text)
8. 1.071 217.326 ↓ 0.0 0 2,498

Nested Loop (cost=6.05..260.88 rows=18 width=33) (actual time=0.087..0.087 rows=0 loops=2,498)

9. 13.210 207.334 ↓ 0.0 0 2,498

Nested Loop (cost=5.63..235.58 rows=54 width=66) (actual time=0.083..0.083 rows=0 loops=2,498)

10. 9.992 32.474 ↑ 16.0 6 2,498

Bitmap Heap Scan on ecgps_core_invoicepaymentrecord v0 (cost=5.08..144.16 rows=96 width=66) (actual time=0.011..0.013 rows=6 loops=2,498)

  • Heap Blocks: exact=3,167
11. 22.482 22.482 ↑ 8.0 12 2,498

Bitmap Index Scan on ecgps_core_invoicepaymentrecord_payment_record_invoice_id_like (cost=0..5.06 rows=96 width=0) (actual time=0.009..0.009 rows=12 loops=2,498)

  • Index Cond: ((payment_record_invoice_id)::text = (ecgps_core_invoice.id)::text)
12. 161.650 161.650 ↓ 0.0 0 16,165

Index Scan using ecgps_core_payment_pkey on ecgps_core_payment v1 (cost=0.56..0.94 rows=1 width=66) (actual time=0.01..0.01 rows=0 loops=16,165)

  • Index Cond: ((id)::text = (v0.payment_record_id)::text)
  • Filter: (NOT is_auto_release)
13. 8.921 8.921 ↑ 1.0 1 811

Index Scan using ecgps_core_userprofilestudy_profile_id_197f15c8194ec51d_uniq on ecgps_core_userprofilestudy u0 (cost=0.42..0.47 rows=1 width=33) (actual time=0.011..0.011 rows=1 loops=811)

  • Index Cond: (((profile_id)::text = '3ef4d33492f3489985aaba7eeb5e3918'::text) AND ((study_id)::text = (v1.study_id)::text))
  • Filter: ((sponsor_portal_access)::text = 'active'::text)
14. 4.055 4.055 ↑ 1.0 1 811

Index Scan using ecgps_core_payeeevent_id_50309a15dc81cefc_like on ecgps_core_payeeevent ecgps_core_payeeevent (cost=0.41..3.81 rows=1 width=66) (actual time=0.005..0.005 rows=1 loops=811)

  • Index Cond: ((ecgps_core_invoice.payee_event_id)::text = (id)::text)
15. 0.811 5.677 ↑ 1.0 1 811

Nested Loop (cost=0.55..1.1 rows=1 width=112) (actual time=0.007..0.007 rows=1 loops=811)

16. 1.622 1.622 ↑ 1.0 1 811

Index Only Scan using ecgps_core_event_id_391e7f0ea35b6e5f_like on ecgps_core_event ecgps_core_event (cost=0.28..0.3 rows=1 width=33) (actual time=0.002..0.002 rows=1 loops=811)

  • Index Cond: (id = (ecgps_core_payeeevent.event_id)::text)
  • Heap Fetches: 811
17. 3.244 3.244 ↑ 1.0 1 811

Index Scan using ecgps_core_study_event_id_key on ecgps_core_study ecgps_core_study (cost=0.28..0.79 rows=1 width=112) (actual time=0.003..0.004 rows=1 loops=811)

  • Index Cond: ((ecgps_core_event.id)::text = (event_id)::text)
Planning time : 6.347 ms
Execution time : 237.4 ms