explain.depesz.com

PostgreSQL's explain analyze made readable

Result: KiYS

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 5,062.693 ↑ 1.0 1 1

Limit (cost=142,431.90..142,431.90 rows=1 width=20) (actual time=5,062.693..5,062.693 rows=1 loops=1)

2. 0.029 5,062.691 ↑ 17,234.0 1 1

Sort (cost=142,431.90..142,474.99 rows=17,234 width=20) (actual time=5,062.691..5,062.691 rows=1 loops=1)

  • Sort Key: rpnto.last_resp_received DESC
  • Sort Method: quicksort Memory: 25kB
3. 745.808 5,062.662 ↑ 17,234.0 1 1

Hash Join (cost=55,421.50..142,345.73 rows=17,234 width=20) (actual time=3,435.365..5,062.662 rows=1 loops=1)

  • Hash Cond: (rpnt.ntfn_id = nt.ntfn_id)
  • Join Filter: (((rpnt.ntfn_id = '317617624'::bigint) OR (alternatives: SubPlan 3 or hashed SubPlan 4) OR ((alternatives: SubPlan 5 or hashed SubPlan 6) AND ((nt.cat)::text = 'PERSON'::text))) AND ((rpnt.last_resp_value IS NOT NULL) OR (alternatives: SubPlan 1 or hashed SubPlan 2)))
  • Rows Removed by Join Filter: 11062
4. 552.717 4,109.365 ↑ 4.5 2,121,478 1

Nested Loop (cost=28,211.18..90,313.26 rows=9,456,057 width=56) (actual time=756.553..4,109.365 rows=2,121,478 loops=1)

5. 170.713 813.024 ↓ 2.8 11,063 1

Gather (cost=28,210.74..64,676.11 rows=3,924 width=36) (actual time=756.477..813.024 rows=11,063 loops=1)

  • Workers Planned: 4
  • Workers Launched: 4
6. 59.955 642.311 ↓ 2.3 2,213 5 / 5

Hash Join (cost=27,210.74..63,283.71 rows=981 width=36) (actual time=607.832..642.311 rows=2,213 loops=5)

  • Hash Cond: (rpnto.ntfn_id = nto.ntfn_id)
7. 325.988 325.988 ↑ 1.2 136,483 5 / 5

Parallel Index Scan Backward using recipient_ntfn_ntfn_id_lrr_not_null_pidx on recipient_ntfn rpnto (cost=0.42..35,634.45 rows=167,218 width=36) (actual time=0.111..325.988 rows=136,483 loops=5)

8. 60.916 256.368 ↓ 1.1 177,633 5 / 5

Hash (cost=25,193.17..25,193.17 rows=161,372 width=16) (actual time=256.368..256.368 rows=177,633 loops=5)

  • Buckets: 262144 Batches: 1 Memory Usage: 10375kB
9. 195.452 195.452 ↓ 1.1 177,633 5 / 5

Index Scan using idx_ntfn1 on ntfn nto (cost=0.56..25,193.17 rows=161,372 width=16) (actual time=0.068..195.452 rows=177,633 loops=5)

  • Index Cond: (ev_id = '78572093'::bigint)
10. 2,743.624 2,743.624 ↓ 1.1 192 11,063

Index Scan using idx_recipient_ntfn5 on recipient_ntfn rpnt (cost=0.44..4.78 rows=175 width=28) (actual time=0.010..0.248 rows=192 loops=11,063)

  • Index Cond: (recipient_id = rpnto.recipient_id)
11. 62.827 207.403 ↓ 1.1 177,633 1

Hash (cost=25,193.17..25,193.17 rows=161,372 width=22) (actual time=207.403..207.403 rows=177,633 loops=1)

  • Buckets: 262144 Batches: 1 Memory Usage: 11505kB
12. 144.576 144.576 ↓ 1.1 177,633 1

Index Scan using idx_ntfn1 on ntfn nt (cost=0.56..25,193.17 rows=161,372 width=22) (actual time=0.042..144.576 rows=177,633 loops=1)

  • Index Cond: (ev_id = '78572093'::bigint)
13.          

SubPlan (for Hash Join)

14. 0.000 0.000 ↓ 0.0 0

Result (cost=0.56..3.58 rows=1 width=0) (never executed)

  • One-Time Filter: ((nt.cat)::text = 'PERSON'::text)
15. 0.000 0.000 ↓ 0.0 0

Index Scan using recipient_ntfn_pk on recipient_ntfn rpnt3 (cost=0.56..3.58 rows=1 width=0) (never executed)

  • Index Cond: (ntfn_id = '317617624'::bigint)
  • Filter: (parent_ntfn_id = rpnt.ntfn_id)
16. 0.046 0.046 ↑ 1.0 1 1

Index Scan using recipient_ntfn_pk on recipient_ntfn rpnt3_1 (cost=0.56..3.58 rows=1 width=40) (actual time=0.045..0.046 rows=1 loops=1)

  • Index Cond: (ntfn_id = '317617624'::bigint)
17. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..7.04 rows=1 width=0) (never executed)

18. 0.000 0.000 ↓ 0.0 0

Index Scan using live_ntfn_pk on live_ntfn lvnt (cost=0.43..3.45 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = '317617624'::bigint)
19. 0.000 0.000 ↓ 0.0 0

Index Scan using recipient_ntfn_pk on recipient_ntfn rpnt4 (cost=0.56..3.58 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = lvnt.dvc_ntfn_id)
  • Filter: (parent_ntfn_id = rpnt.ntfn_id)
20. 0.001 0.040 ↓ 0.0 0 1

Nested Loop (cost=0.99..7.03 rows=1 width=8) (actual time=0.040..0.040 rows=0 loops=1)

21. 0.039 0.039 ↓ 0.0 0 1

Index Scan using live_ntfn_pk on live_ntfn lvnt_1 (cost=0.43..3.45 rows=1 width=8) (actual time=0.039..0.039 rows=0 loops=1)

  • Index Cond: (ntfn_id = '317617624'::bigint)
22. 0.000 0.000 ↓ 0.0 0

Index Scan using recipient_ntfn_pk on recipient_ntfn rpnt4_1 (cost=0.56..3.58 rows=1 width=16) (never executed)

  • Index Cond: (ntfn_id = lvnt_1.dvc_ntfn_id)
23. 0.000 0.000 ↓ 0.0 0

Nested Loop (cost=0.99..32.11 rows=1 width=0) (never executed)

24. 0.000 0.000 ↓ 0.0 0

Index Scan using recipient_ntfn_recipient_id_lrr_not_null_pidx on recipient_ntfn rpnt2 (cost=0.42..10.61 rows=6 width=8) (never executed)

  • Index Cond: (recipient_id = rpnt.recipient_id)
25. 0.000 0.000 ↓ 0.0 0

Index Scan using ntfn_pk on ntfn nt2 (cost=0.56..3.58 rows=1 width=8) (never executed)

  • Index Cond: (ntfn_id = rpnt2.ntfn_id)
  • Filter: (ev_id = nt.ev_id)
26. 0.000 0.000 ↓ 0.0 0

Gather (cost=1,000.99..435,300.96 rows=668,873 width=16) (never executed)

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

Nested Loop (cost=0.99..367,413.66 rows=167,218 width=16) (never executed)

28. 0.000 0.000 ↓ 0.0 0

Parallel Index Scan Backward using recipient_ntfn_ntfn_id_lrr_not_null_pidx on recipient_ntfn rpnt2_1 (cost=0.42..35,634.45 rows=167,218 width=16) (never executed)

29. 0.000 0.000 ↓ 0.0 0

Index Scan using ntfn_pk on ntfn nt2_1 (cost=0.56..1.98 rows=1 width=16) (never executed)

  • Index Cond: (ntfn_id = rpnt2_1.ntfn_id)
Planning time : 2.143 ms
Execution time : 5,063.851 ms