explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W0JQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.063 263.416 ↑ 1.0 1 1

Aggregate (cost=154,929.41..154,929.42 rows=1 width=8) (actual time=263.416..263.416 rows=1 loops=1)

2. 240.285 263.353 ↓ 130.0 130 1

Nested Loop (cost=0.99..154,929.40 rows=1 width=8) (actual time=32.929..263.353 rows=130 loops=1)

  • -> Index Scan using idx_rrs_recip_id_date on recip_resp_stats recipientr0_ (cost=0.56..154872.32 rows=1 width=8) (actual time=0.026..231.357 rows=11534 lo
  • 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 ti
  • Filter: ((recipient_cat)::text = 'PERSON'::text)
  • Rows Removed by Filter: 4757
3. 19.053 23.068 ↓ 0.0 0 11,534

Index Scan using recipients_pk on recipients recipienti1_ (cost=0.43..57.07 rows=1 width=8) (actual time=0.002..0.002 rows=0 loops=11,534)

  • 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
  • Rows Removed by Filter: 1
4.          

SubPlan (forIndex Scan)

5. 0.390 0.390 ↓ 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.002..0.003 rows=2 loops=130)

  • Index Cond: (person_id = recipienti1_.recipient_id)
  • Heap Fetches: 38
6. 0.875 3.625 ↑ 1.0 1 125

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

  • Merge Cond: (administra4_.func_id = defaultadm5_.role_id)
  • -> Index Only Scan using persons_func_pk on persons_func administra4_ (cost=0.42..3.44 rows=1 width=8) (actual time=0.004..0.004 rows=1 loop
  • Index Cond: (person_id = recipienti1_.recipient_id)
  • Heap Fetches: 125
7. 2.750 2.750 ↑ 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.001..0.022 rows=26 loops=125)

  • Index Cond: (role_id = ANY ('{1520280,1520281,1520282,1520283,1520284,1520285,1520286,1520287,1520288,1520289,1520292,1520293,1520294,15
  • Heap Fetches: 0
8. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=15.77..12,062.70 rows=1,805 width=8) (never executed)

9. 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,15
  • Heap Fetches: 0
10. 0.000 0.000 ↓ 0.0 0

Bitmap Heap Scan on persons_func administra4__1 (cost=15.49..359.86 rows=419 width=16) (never executed)

  • Recheck Cond: (func_id = defaultadm5__1.role_id)
11. 0.000 0.000 ↓ 0.0 0

Bitmap Index Scan on idx_persons_func2 (cost=0.00..15.38 rows=419 width=0) (never executed)

  • Index Cond: (func_id = defaultadm5__1.role_id)
Planning time : 2.872 ms
Execution time : 263.600 ms