explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Y8c5

Settings
# exclusive inclusive rows x rows loops node
1. 0.125 692.889 ↑ 1.0 1 1

Aggregate (cost=974,998.21..974,998.22 rows=1 width=8) (actual time=692.889..692.889 rows=1 loops=1)

2. 10.580 692.764 ↓ 2.2 130 1

Nested Loop (cost=0.99..974,998.06 rows=58 width=8) (actual time=111.688..692.764 rows=130 loops=1)

3. 635.144 635.144 ↑ 1.2 11,760 1

Index Scan using idx_rrs_recip_id_date on recip_resp_stats recipientr0_ (cost=0.56..150,627.30 rows=14,650 width=8) (actual time=0.204..635.144 rows=11,760 loops=1)

  • Index Cond: ((evs_creation >= '2019-11-05 15:11:00+00'::timestamp with time zone) AND (evs_creation <= '2019-11-06 15:11:59.999+00'::timestamp with time zone) AND (is_latest = 'Y'::bpchar))
  • Filter: ((recipient_cat)::text = 'PERSON'::text)
  • Rows Removed by Filter: 4919
4. 40.620 47.040 ↓ 0.0 0 11,760

Index Scan using recipients_pk on recipients recipienti1_ (cost=0.43..56.27 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=11,760)

  • Index Cond: (recipient_id = recipientr0_.recip_id)
  • Filter: ((org_id = '200363'::bigint) AND ((SubPlan 1) OR (recipient_id = '5615025'::bigint) OR ((org_id = '200363'::bigint) AND (alternatives: SubPlan 2 or hashed SubPlan 3))))
  • Rows Removed by Filter: 1
5.          

SubPlan (for Index Scan)

6. 1.170 1.170 ↓ 2.0 2 130

Index Only Scan using person_sups_pk on person_sups supervisor3_ (cost=0.42..1.94 rows=1 width=8) (actual time=0.007..0.009 rows=2 loops=130)

  • Index Cond: (person_id = recipienti1_.recipient_id)
  • Heap Fetches: 38
7. 0.500 5.250 ↑ 1.0 1 125

Merge Join (cost=0.70..52.43 rows=1 width=0) (actual time=0.042..0.042 rows=1 loops=125)

  • Merge Cond: (administra4_.func_id = defaultadm5_.role_id)
8. 1.125 1.125 ↑ 1.0 1 125

Index Only Scan using persons_func_pk on persons_func administra4_ (cost=0.42..3.44 rows=1 width=8) (actual time=0.009..0.009 rows=1 loops=125)

  • Index Cond: (person_id = recipienti1_.recipient_id)
  • Heap Fetches: 38
9. 3.625 3.625 ↑ 1.3 26 125

Index Only Scan using role_pk on role defaultadm5_ (cost=0.28..48.90 rows=33 width=8) (actual time=0.003..0.029 rows=26 loops=125)

  • Index Cond: (role_id = ANY ('{1520280,1520281,1520282,1520283,1520284,1520285,1520286,1520287,1520288,1520289,1520292,1520293,1520294,1520295,1520296,1520297,1520298,1520299,1
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,049.73..12,323.66 rows=2,072 width=8) (never executed)

  • Workers Planned: 4
  • Workers Launched: 0
11. 0.000 0.000 ↓ 0.0 0

Hash Join (cost=49.73..11,116.46 rows=518 width=8) (never executed)

  • Hash Cond: (administra4__1.func_id = defaultadm5__1.role_id)
12. 0.000 0.000 ↓ 0.0 0

Parallel Index Only Scan using persons_func_pk on persons_func administra4__1 (cost=0.42..10,754.62 rows=118,988 width=16) (never executed)

  • Heap Fetches: 0
13. 0.000 0.000 ↓ 0.0 0

Hash (cost=48.90..48.90 rows=33 width=8) (never executed)

14. 0.000 0.000 ↓ 0.0 0

Index Only Scan using role_pk on role defaultadm5__1 (cost=0.28..48.90 rows=33 width=8) (never executed)

  • Index Cond: (role_id = ANY ('{1520280,1520281,1520282,1520283,1520284,1520285,1520286,1520287,1520288,1520289,1520292,1520293,1520294,1520295,1520296,1520297,15202
  • Heap Fetches: 0
Planning time : 12.538 ms
Execution time : 693.182 ms