explain.depesz.com

PostgreSQL's explain analyze made readable

Result: NKdL : Invoice Tasks - Pending Approval

Settings
# exclusive inclusive rows x rows loops node
1. 0.160 3.575 ↑ 2.7 68 1

HashAggregate (cost=3,670.57..3,672.39 rows=182 width=112) (actual time=3.566..3.575 rows=68 loops=1)

  • Group Key: ecgps_core_study.id, ecgps_core_study.study_name, ecgps_core_study.protocol, ecgps_core_study.slug
2. 0.071 3.415 ↓ 1.4 251 1

Nested Loop (cost=1,583.95..3,668.29 rows=182 width=112) (actual time=0.671..3.415 rows=251 loops=1)

3. 0.165 2.842 ↓ 1.4 251 1

Hash Join (cost=1,583.67..3,611.61 rows=182 width=178) (actual time=0.664..2.842 rows=251 loops=1)

4. 0.117 2.058 ↓ 1.0 251 1

Nested Loop (cost=1.11..2,026.29 rows=249 width=178) (actual time=0.033..2.058 rows=251 loops=1)

5. 0.244 1.188 ↓ 1.0 251 1

Nested Loop (cost=0.83..1,947.48 rows=249 width=66) (actual time=0.028..1.188 rows=251 loops=1)

6. 0.191 0.191 ↓ 1.0 251 1

Index Scan using idx_invoice_invoicestatus on ecgps_core_invoice ecgps_core_invoice (cost=0.42..229.3 rows=249 width=66) (actual time=0.02..0.191 rows=251 loops=1)

  • Index Cond: ((invoice_status)::text = 'pending_sponsor_acceptance'::text)
7. 0.753 0.753 ↑ 1.0 1 251

Index Scan using ecgps_core_payeeevent_id_50309a15dc81cefc_like on ecgps_core_payeeevent ecgps_core_payeeevent (cost=0.41..6.89 rows=1 width=66) (actual time=0.003..0.003 rows=1 loops=251)

  • Index Cond: ((id)::text = (ecgps_core_invoice.payee_event_id)::text)
8. 0.753 0.753 ↑ 1.0 1 251

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

  • Index Cond: ((event_id)::text = (ecgps_core_payeeevent.event_id)::text)
9. 0.185 0.619 ↓ 1.4 710 1

Hash (cost=1,576.09..1,576.09 rows=518 width=33) (actual time=0.619..0.619 rows=710 loops=1)

10. 0.284 0.434 ↓ 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.182..0.434 rows=710 loops=1)

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

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

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

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=251)

  • Index Cond: (id = (ecgps_core_payeeevent.event_id)::text)
  • Heap Fetches: 251
Planning time : 2.093 ms
Execution time : 3.682 ms