explain.depesz.com

PostgreSQL's explain analyze made readable

Result: bwN3 : Payment Tasks - Declined Payments

Settings
# exclusive inclusive rows x rows loops node
1. 28.751 203.662 ↑ 11.0 435 1

HashAggregate (cost=111,480.96..111,528.95 rows=4,799 width=112) (actual time=203.568..203.662 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. 18.898 174.911 ↓ 1.3 41,835 1

Hash Join (cost=2,643.52..111,077.84 rows=32,250 width=112) (actual time=20.348..174.911 rows=41,835 loops=1)

3. 22.627 153.772 ↓ 1.3 41,835 1

Hash Join (cost=956.85..109,034.95 rows=32,250 width=66) (actual time=18.098..153.772 rows=41,835 loops=1)

  • Filter: (((ecgps_core_paymentcreationtype.short_name)::text = 'standard'::text) OR (ecgps_core_payment.payment_creation_type_id IS NULL))
4. 121.872 131.136 ↓ 1.0 41,929 1

Bitmap Heap Scan on ecgps_core_payment ecgps_core_payment (cost=955.81..108,655.38 rows=41,210 width=99) (actual time=18.064..131.136 rows=41,929 loops=1)

  • Heap Blocks: exact=29,071
5. 9.264 9.264 ↓ 1.0 41,929 1

Bitmap Index Scan on idx_payment_status_isautoapprove (cost=0..945.5 rows=41,210 width=0) (actual time=9.264..9.264 rows=41,929 loops=1)

  • Index Cond: ((status)::text = 'declined'::text)
6. 0.004 0.009 ↑ 1.0 2 1

Hash (cost=1.02..1.02 rows=2 width=356) (actual time=0.009..0.009 rows=2 loops=1)

7. 0.005 0.005 ↑ 1.0 2 1

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

8. 0.266 2.241 ↓ 1.4 710 1

Hash (cost=1,680.19..1,680.19 rows=518 width=112) (actual time=2.241..2.241 rows=710 loops=1)

9. 0.321 1.975 ↓ 1.4 710 1

Hash Join (cost=118.7..1,680.19 rows=518 width=112) (actual time=0.803..1.975 rows=710 loops=1)

10. 0.895 1.069 ↓ 1.4 710 1

Bitmap Heap Scan on ecgps_core_userprofilestudy u0 (cost=21.73..1,576.09 rows=518 width=33) (actual time=0.207..1.069 rows=710 loops=1)

  • Heap Blocks: exact=233
11. 0.174 0.174 ↓ 1.4 710 1

Bitmap Index Scan on idx_userprofilestudy_profileid_sponsorportalaccess (cost=0..21.6 rows=518 width=0) (actual time=0.174..0.174 rows=710 loops=1)

  • Index Cond: (((profile_id)::text = '3ef4d33492f3489985aaba7eeb5e3918'::text) AND ((sponsor_portal_access)::text = 'active'::text))
12. 0.215 0.585 ↑ 1.0 710 1

Hash (cost=88.1..88.1 rows=710 width=79) (actual time=0.585..0.585 rows=710 loops=1)

13. 0.370 0.370 ↑ 1.0 710 1

Seq Scan on ecgps_core_study ecgps_core_study (cost=0..88.1 rows=710 width=79) (actual time=0.005..0.37 rows=710 loops=1)

Planning time : 1.767 ms
Execution time : 203.807 ms