explain.depesz.com

PostgreSQL's explain analyze made readable

Result: GUXz

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 89.994 ↓ 0.0 0 1

Limit (cost=46,397.63..46,398.81 rows=10 width=231) (actual time=89.993..89.994 rows=0 loops=1)

2. 19.544 96.097 ↓ 0.0 0 1

Gather Merge (cost=46,397.63..48,933.75 rows=21,432 width=231) (actual time=89.990..96.097 rows=0 loops=1)

  • Workers Planned: 3
  • Workers Launched: 3
3. 0.133 76.553 ↓ 0.0 0 4 / 4

Sort (cost=45,397.59..45,415.45 rows=7,144 width=231) (actual time=76.553..76.553 rows=0 loops=4)

  • Sort Key: webchatuse5_.updated DESC, webchatuse5_.daemon_user_id, message1_.id
  • Sort Method: quicksort Memory: 25kB
  • Worker 0: Sort Method: quicksort Memory: 25kB
  • Worker 1: Sort Method: quicksort Memory: 25kB
  • Worker 2: Sort Method: quicksort Memory: 25kB
4. 0.065 76.420 ↓ 0.0 0 4 / 4

Nested Loop (cost=292.21..45,243.21 rows=7,144 width=231) (actual time=76.419..76.420 rows=0 loops=4)

5. 0.619 75.932 ↑ 77.8 42 4 / 4

Hash Left Join (cost=291.78..28,252.08 rows=3,266 width=215) (actual time=49.075..75.932 rows=42 loops=4)

  • Hash Cond: (message1_.user_id = user6_.id)
6. 0.111 66.310 ↑ 77.8 42 4 / 4

Nested Loop (cost=111.85..28,063.58 rows=3,266 width=204) (actual time=39.541..66.310 rows=42 loops=4)

7. 0.119 65.734 ↑ 77.8 42 4 / 4

Nested Loop (cost=111.42..25,919.77 rows=3,266 width=204) (actual time=39.386..65.734 rows=42 loops=4)

8. 0.133 64.559 ↑ 77.8 42 4 / 4

Nested Loop (cost=110.99..23,008.27 rows=3,266 width=209) (actual time=39.230..64.559 rows=42 loops=4)

9. 6.669 64.046 ↑ 77.8 42 4 / 4

Nested Loop (cost=110.56..20,229.38 rows=3,266 width=204) (actual time=39.131..64.046 rows=42 loops=4)

10. 21.137 22.640 ↑ 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.235..22.640 rows=2,895 loops=4)

  • Recheck Cond: (is_sent = 0)
  • Heap Blocks: exact=7478
11. 1.503 1.503 ↓ 1.5 15,105 1 / 4

Bitmap Index Scan on message_data_is_sent_idx (cost=0.00..107.45 rows=10,145 width=0) (actual time=6.013..6.013 rows=15,105 loops=1)

  • Index Cond: (is_sent = 0)
12. 34.737 34.737 ↓ 0.0 0 11,579 / 4

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

  • Index Cond: (id = messagedat0_.message_id)
  • Filter: (type >= 0)
  • Rows Removed by Filter: 1
13. 0.380 0.380 ↑ 1.0 1 169 / 4

Index Scan using msg_dialogs_pkey on msg_dialogs dialog2_ (cost=0.43..0.85 rows=1 width=21) (actual time=0.009..0.009 rows=1 loops=169)

  • Index Cond: (id = message1_.dialog_id)
14. 1.056 1.056 ↑ 1.0 1 169 / 4

Index Scan using msg_clients_login_idx on msg_clients client4_ (cost=0.43..0.89 rows=1 width=22) (actual time=0.025..0.025 rows=1 loops=169)

  • Index Cond: ((login)::text = (dialog2_.external_id)::text)
15. 0.465 0.465 ↑ 1.0 1 169 / 4

Index Only Scan using msg_appeals_pkey on msg_appeals appeal3_ (cost=0.43..0.66 rows=1 width=8) (actual time=0.011..0.011 rows=1 loops=169)

  • Index Cond: (id = message1_.appeal_id)
  • Heap Fetches: 14
16. 3.645 9.003 ↑ 1.0 3,394 4 / 4

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

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

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

18. 0.422 0.422 ↓ 0.0 0 169 / 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=24) (actual time=0.010..0.010 rows=0 loops=169)

  • Index Cond: (client_id = client4_.id)
Planning time : 6.597 ms
Execution time : 96.389 ms