explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6VAs

Settings
# exclusive inclusive rows x rows loops node
1. 98.503 32,733.820 ↓ 6.3 139,260 1

Gather (cost=1,292.21..48,507.05 rows=22,188 width=223) (actual time=14.165..32,733.820 rows=139,260 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
2. 82.327 32,635.317 ↓ 4.9 34,815 4 / 4

Nested Loop (cost=292.21..45,288.25 rows=7,157 width=223) (actual time=8.733..32,635.317 rows=34,815 loops=4)

3. 10.460 2,016.272 ↑ 1.1 2,895 4 / 4

Hash Left Join (cost=291.78..28,260.71 rows=3,273 width=215) (actual time=8.674..2,016.272 rows=2,895 loops=4)

  • Hash Cond: (message1_.user_id = user6_.id)
4. 14.253 1,999.919 ↑ 1.1 2,895 4 / 4

Nested Loop (cost=111.85..28,072.19 rows=3,273 width=204) (actual time=2.401..1,999.919 rows=2,895 loops=4)

5. 14.542 1,962.508 ↑ 1.1 2,895 4 / 4

Nested Loop (cost=111.42..25,923.78 rows=3,273 width=204) (actual time=2.299..1,962.508 rows=2,895 loops=4)

6. 13.702 483.223 ↑ 1.1 2,895 4 / 4

Nested Loop (cost=110.99..23,006.04 rows=3,273 width=209) (actual time=2.177..483.223 rows=2,895 loops=4)

7. 19.872 113.467 ↑ 1.1 2,895 4 / 4

Nested Loop (cost=110.56..20,221.20 rows=3,273 width=204) (actual time=2.096..113.467 rows=2,895 loops=4)

8. 37.155 38.595 ↑ 1.1 2,895 4 / 4

Parallel Bitmap Heap Scan on msg_messages_data messagedat0_ (cost=109.99..11,211.65 rows=3,273 width=169) (actual time=2.002..38.595 rows=2,895 loops=4)

  • Recheck Cond: (is_sent = 0)
  • Heap Blocks: exact=3223
9. 1.440 1.440 ↓ 1.9 19,598 1 / 4

Bitmap Index Scan on message_data_is_sent_idx (cost=0.00..107.45 rows=10,145 width=0) (actual time=5.759..5.759 rows=19,598 loops=1)

  • Index Cond: (is_sent = 0)
10. 55.000 55.000 ↑ 1.0 1 11,579 / 4

Index Scan using msg_messages_id_idx on msg_messages message1_ (cost=0.57..2.75 rows=1 width=43) (actual time=0.019..0.019 rows=1 loops=11,579)

  • Index Cond: (id = messagedat0_.message_id)
11. 356.054 356.054 ↑ 1.0 1 11,579 / 4

Index Scan using msg_dialogs_pkey on msg_dialogs dialog2_ (cost=0.43..0.85 rows=1 width=21) (actual time=0.123..0.123 rows=1 loops=11,579)

  • Index Cond: (id = message1_.dialog_id)
12. 1,464.744 1,464.744 ↑ 1.0 1 11,579 / 4

Index Scan using msg_clients_login_idx on msg_clients client4_ (cost=0.43..0.89 rows=1 width=22) (actual time=0.506..0.506 rows=1 loops=11,579)

  • Index Cond: ((login)::text = (dialog2_.external_id)::text)
13. 23.158 23.158 ↑ 1.0 1 11,579 / 4

Index Only Scan using msg_appeals_pkey on msg_appeals appeal3_ (cost=0.43..0.66 rows=1 width=8) (actual time=0.008..0.008 rows=1 loops=11,579)

  • Index Cond: (id = message1_.appeal_id)
  • Heap Fetches: 22
14. 2.491 5.893 ↑ 1.0 3,394 4 / 4

Hash (cost=137.19..137.19 rows=3,419 width=19) (actual time=5.892..5.893 rows=3,394 loops=4)

  • Buckets: 4096 Batches: 1 Memory Usage: 202kB
15. 3.402 3.402 ↑ 1.0 3,394 4 / 4

Seq Scan on users user6_ (cost=0.00..137.19 rows=3,419 width=19) (actual time=0.041..3.402 rows=3,394 loops=4)

16. 30,536.718 30,536.718 ↑ 1.8 12 11,579 / 4

Index Scan using web_chat_user_data_client_id_idx1 on web_chat_user_data webchatuse5_ (cost=0.43..4.98 rows=22 width=16) (actual time=2.054..10.549 rows=12 loops=11,579)

  • Index Cond: (client_id = client4_.id)
Planning time : 3.569 ms
Execution time : 32,812.202 ms