explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bpA : Optimization for: Declined Payments - Sharing; plan #USG5

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 30.800 223.346 ↑ 12.6 435 1

HashAggregate (cost=3,899.89..3,954.63 rows=5,474 width=112) (actual time=223.26..223.346 rows=435 loops=1)

  • Group Key: ecgps_core_payment.study_id, ecgps_core_study.study_name, ecgps_core_study.protocol, ecgps_core_study.slug
2. 19.006 192.546 ↓ 3.5 41,835 1

Hash Join (cost=6.44..3,752.46 rows=11,795 width=112) (actual time=0.268..192.546 rows=41,835 loops=1)

  • Filter: (((ecgps_core_paymentcreationtype.short_name)::text = 'standard'::text) OR (ecgps_core_payment.payment_creation_type_id IS NULL))
3. 15.865 173.538 ↓ 2.8 41,929 1

Nested Loop (cost=5.4..3,609.07 rows=15,208 width=145) (actual time=0.257..173.538 rows=41,929 loops=1)

4. 0.548 6.443 ↓ 54.6 710 1

Nested Loop (cost=4.84..165.54 rows=13 width=112) (actual time=0.216..6.443 rows=710 loops=1)

5. 1.478 1.635 ↓ 54.6 710 1

Bitmap Heap Scan on ecgps_core_userprofilestudy u0 (cost=4.57..77.57 rows=13 width=33) (actual time=0.198..1.635 rows=710 loops=1)

  • Filter: ((sponsor_portal_access)::text = 'active'::text)
  • Heap Blocks: exact=233
6. 0.157 0.157 ↓ 37.4 710 1

Bitmap Index Scan on ecgps_core_userprofilestudy_profile_id_like (cost=0..4.56 rows=19 width=0) (actual time=0.157..0.157 rows=710 loops=1)

  • Index Cond: ((profile_id)::text = '3ef4d33492f3489985aaba7eeb5e3918'::text)
7. 4.260 4.260 ↑ 1.0 1 710

Index Scan using ecgps_core_study_pkey on ecgps_core_study ecgps_core_study (cost=0.28..6.76 rows=1 width=79) (actual time=0.005..0.006 rows=1 loops=710)

  • Index Cond: ((id)::text = (u0.study_id)::text)
8. 151.230 151.230 ↑ 1.6 59 710

Index Scan using ecgps_core_payment_status_studyid_index on ecgps_core_payment ecgps_core_payment (cost=0.56..263.94 rows=95 width=99) (actual time=0.016..0.213 rows=59 loops=710)

  • Index Cond: (((status)::text = 'declined'::text) AND ((study_id)::text = (ecgps_core_study.id)::text))
9. 0.001 0.002 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=42) (actual time=0.002..0.002 rows=2 loops=1)

10. 0.001 0.001 ↑ 1.0 2 1

Seq Scan on ecgps_core_paymentcreationtype ecgps_core_paymentcreationtype (cost=0..1.02 rows=2 width=42) (actual time=0.001..0.001 rows=2 loops=1)

Planning time : 3.704 ms
Execution time : 223.498 ms