explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VxDT : No Filter

Settings
# exclusive inclusive rows x rows loops node
1. 0.685 7,128.903 ↑ 3.3 76 1

Nested Loop Left Join (cost=10,838.90..13,426.89 rows=250 width=465) (actual time=160.973..7,128.903 rows=76 loops=1)

  • Join Filter: ((((r.target_name)::text || '|'::text) || (dn.name)::text) = (v.value)::text)
  • Filter: (((r.recipient_cat)::text <> 'DEVICE'::text) OR (((r.recipient_cat)::text = 'DEVICE'::text) AND (dn.name IS NOT NULL)))
2. 6.318 7,128.066 ↑ 4.0 76 1

Nested Loop (cost=10,838.76..13,371.96 rows=305 width=629) (actual time=160.955..7,128.066 rows=76 loops=1)

3. 0.278 122.832 ↓ 76.0 76 1

Nested Loop (cost=9,467.75..9,893.71 rows=1 width=607) (actual time=104.900..122.832 rows=76 loops=1)

4. 0.377 119.438 ↓ 76.0 76 1

Nested Loop (cost=9,467.19..9,887.77 rows=1 width=473) (actual time=104.852..119.438 rows=76 loops=1)

5. 0.563 115.561 ↑ 1.0 100 1

Nested Loop (cost=9,466.62..9,810.37 rows=100 width=473) (actual time=104.746..115.561 rows=100 loops=1)

6. 0.154 112.598 ↑ 1.0 100 1

Limit (cost=9,466.20..9,477.87 rows=100 width=497) (actual time=104.677..112.598 rows=100 loops=1)

7. 0.000 112.444 ↑ 718.2 100 1

Gather Merge (cost=9,466.20..17,845.32 rows=71,816 width=497) (actual time=104.676..112.444 rows=100 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
8. 136.665 291.843 ↑ 254.7 141 3

Sort (cost=8,466.18..8,555.95 rows=35,908 width=497) (actual time=97.213..97.281 rows=141 loops=3)

  • Sort Key: evs.creation_date DESC, evs.ev_id DESC
  • Sort Method: quicksort Memory: 16712kB
9. 57.708 155.178 ↑ 1.2 29,199 3

Hash Left Join (cost=5.18..5,749.38 rows=35,908 width=497) (actual time=0.357..51.726 rows=29,199 loops=3)

  • Hash Cond: (evs.message_panel_id = mp.message_panel_id)
10. 97.035 97.035 ↑ 1.2 29,199 3

Parallel Seq Scan on evs (cost=0.00..5,645.84 rows=35,908 width=406) (actual time=0.020..32.345 rows=29,199 loops=3)

  • Filter: (company_id = 1)
  • Rows Removed by Filter: 1
11. 0.207 0.435 ↑ 1.0 97 3

Hash (cost=3.97..3.97 rows=97 width=66) (actual time=0.145..0.145 rows=97 loops=3)

  • Buckets: 1024 Batches: 1 Memory Usage: 18kB
12. 0.228 0.228 ↑ 1.0 97 3

Seq Scan on message_panel mp (cost=0.00..3.97 rows=97 width=66) (actual time=0.028..0.076 rows=97 loops=3)

13. 2.400 2.400 ↑ 1.0 1 100

Index Scan using comm_comm_ev_id_uidx on comm c (cost=0.42..3.31 rows=1 width=16) (actual time=0.024..0.024 rows=1 loops=100)

  • Index Cond: (comm_ev_id = evs.ev_id)
14. 3.500 3.500 ↑ 1.0 1 100

Index Scan using idx_comm_fld_name on comm_flds f (cost=0.56..0.76 rows=1 width=16) (actual time=0.034..0.035 rows=1 loops=100)

  • Index Cond: ((comm_id = c.comm_id) AND ((name)::text = 'recipients'::text))
15. 3.116 3.116 ↑ 3.0 1 76

Index Scan using idx_comm_values1 on comm_values v (cost=0.56..5.91 rows=3 width=150) (actual time=0.037..0.041 rows=1 loops=76)

  • Index Cond: (comm_fld_id = f.comm_fld_id)
16. 6,545.196 6,998.916 ↑ 305.0 1 76

Bitmap Heap Scan on recipients r (cost=1,371.00..3,475.21 rows=305 width=30) (actual time=51.120..92.091 rows=1 loops=76)

  • Recheck Cond: (((v.value)::text = (target_name)::text) OR ((recipient_cat)::text = 'DEVICE'::text))
  • Filter: (((recipient_cat)::text <> 'TEAM'::text) AND (((recipient_cat)::text <> 'DEVICE'::text) OR ((recipient_cat)::text = 'DEVICE'::text)) AND (((v.value)::text = (target_name)::text) OR (((v.value)::text ~~* ((target_name)::text || '|%'::text)) AND ((recipient_cat)::text = 'DEVICE'::text))))
  • Rows Removed by Filter: 76893
  • Heap Blocks: exact=257038
17. 0.228 453.720 ↓ 0.0 0 76

BitmapOr (cost=1,371.00..1,371.00 rows=76,462 width=0) (actual time=5.970..5.970 rows=0 loops=76)

18. 1.976 1.976 ↓ 1.2 7 76

Bitmap Index Scan on idx_recipients_stn (cost=0.00..0.46 rows=6 width=0) (actual time=0.026..0.026 rows=7 loops=76)

  • Index Cond: ((v.value)::text = (target_name)::text)
19. 451.516 451.516 ↓ 1.0 80,251 76

Bitmap Index Scan on idx_recipients_recipient_cat (cost=0.00..1,350.84 rows=76,456 width=0) (actual time=5.941..5.941 rows=80,251 loops=76)

  • Index Cond: ((recipient_cat)::text = 'DEVICE'::text)
20. 0.152 0.152 ↓ 0.0 0 76

Index Scan using org_dvc_names_pk on org_dvc_names dn (cost=0.14..0.16 rows=1 width=19) (actual time=0.002..0.002 rows=0 loops=76)

  • Index Cond: (org_dvc_name_id = r.org_dvc_name_id)
Planning time : 17.930 ms
Execution time : 7,132.159 ms