explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wvbo : Optimization for: payments pending approval

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 7.799 1,291.349 ↑ 3.8 175 1

HashAggregate (cost=286,344.56..286,351.17 rows=661 width=112) (actual time=1,291.319..1,291.349 rows=175 loops=1)

  • Group Key: ecgps_core_payment.study_id, ecgps_core_study.study_name, ecgps_core_study.protocol, ecgps_core_study.slug
2. 9.210 1,283.550 ↓ 2.2 9,772 1

Nested Loop (cost=2,115.76..286,289.08 rows=4,439 width=112) (actual time=1.923..1,283.55 rows=9,772 loops=1)

3. 5.773 1,245.024 ↓ 2.2 9,772 1

Hash Join (cost=2,115.48..284,656.57 rows=4,439 width=99) (actual time=1.912..1,245.024 rows=9,772 loops=1)

  • Filter: (((ecgps_core_paymentcreationtype.short_name)::text = 'standard'::text) OR (ecgps_core_payment.payment_creation_type_id IS NULL))
4. 7.260 1,239.247 ↓ 1.8 10,040 1

Hash Join (cost=2,114.44..284,603.43 rows=5,672 width=132) (actual time=1.901..1,239.247 rows=10,040 loops=1)

5. 1,231.334 1,231.334 ↓ 1.8 10,040 1

Seq Scan on ecgps_core_payment ecgps_core_payment (cost=0..282,373.38 rows=5,672 width=99) (actual time=1.238..1,231.334 rows=10,040 loops=1)

  • Filter: ((NOT is_auto_approve) AND ((status)::text = 'pending'::text))
6. 0.157 0.653 ↓ 1.4 710 1

Hash (cost=2,107.96..2,107.96 rows=518 width=33) (actual time=0.653..0.653 rows=710 loops=1)

7. 0.394 0.496 ↓ 1.4 710 1

Bitmap Heap Scan on ecgps_core_userprofilestudy u0 (cost=30.14..2,107.96 rows=518 width=33) (actual time=0.141..0.496 rows=710 loops=1)

  • Filter: ((sponsor_portal_access)::text = 'active'::text)
  • Heap Blocks: exact=233
8. 0.102 0.102 ↑ 1.0 710 1

Bitmap Index Scan on ecgps_core_userprofilestudy_profile_id_like (cost=0..30.01 rows=745 width=0) (actual time=0.102..0.102 rows=710 loops=1)

  • Index Cond: ((profile_id)::text = '3ef4d33492f3489985aaba7eeb5e3918'::text)
9. 0.001 0.004 ↑ 1.0 2 1

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

10. 0.003 0.003 ↑ 1.0 2 1

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

11. 29.316 29.316 ↑ 1.0 1 9,772

Index Scan using ecgps_core_study_pkey on ecgps_core_study ecgps_core_study (cost=0.28..0.36 rows=1 width=79) (actual time=0.003..0.003 rows=1 loops=9,772)

  • Index Cond: ((id)::text = (ecgps_core_payment.study_id)::text)
Planning time : 1.681 ms
Execution time : 1,291.555 ms