explain.depesz.com

PostgreSQL's explain analyze made readable

Result: pVv1

Settings
# exclusive inclusive rows x rows loops node
1. 367.129 5,725.703 ↓ 9.6 1,033,738 1

Gather (cost=143,724.82..590,364.56 rows=108,155 width=232) (actual time=2,973.851..5,725.703 rows=1,033,738 loops=1)

  • Workers Planned: 6
  • Workers Launched: 3
2. 82.759 5,358.574 ↓ 14.3 258,434 4 / 4

Hash Left Join (cost=142,724.82..578,549.06 rows=18,026 width=232) (actual time=2,953.388..5,358.574 rows=258,434 loops=4)

  • Hash Cond: (message1_.user_id = user6_.id)
3. 210.827 5,275.180 ↓ 14.3 258,434 4 / 4

Nested Loop (cost=142,672.24..578,449.06 rows=18,026 width=221) (actual time=2,952.740..5,275.180 rows=258,434 loops=4)

4. 2,052.023 3,772.181 ↓ 14.3 258,434 4 / 4

Parallel Hash Join (cost=142,671.81..560,251.20 rows=18,026 width=221) (actual time=2,951.997..3,772.181 rows=258,434 loops=4)

  • Hash Cond: (webchatuse5_.client_id = client4_.id)
5. 1,288.304 1,288.304 ↓ 1.5 3,979,749 4 / 4

Parallel Seq Scan on web_chat_user_data webchatuse5_ (cost=0.00..380,887.08 rows=2,655,008 width=16) (actual time=0.031..1,288.304 rows=3,979,749 loops=4)

6. 31.089 431.854 ↑ 2.2 10,883 4 / 4

Parallel Hash (cost=141,670.33..141,670.33 rows=23,958 width=213) (actual time=431.854..431.854 rows=10,883 loops=4)

  • Buckets: 4096 Batches: 16 Memory Usage: 928kB
7. 8.562 400.765 ↑ 2.2 10,883 4 / 4

Nested Loop (cost=1.99..141,670.33 rows=23,958 width=213) (actual time=0.198..400.765 rows=10,883 loops=4)

8. 11.083 185.421 ↑ 2.2 10,883 4 / 4

Nested Loop (cost=1.56..104,201.18 rows=23,958 width=219) (actual time=0.136..185.421 rows=10,883 loops=4)

9. 14.181 119.922 ↑ 2.2 10,883 4 / 4

Nested Loop (cost=1.13..67,042.41 rows=23,958 width=213) (actual time=0.089..119.922 rows=10,883 loops=4)

10. 29.558 29.558 ↑ 2.2 10,883 4 / 4

Parallel Index Scan using message_data_is_sent_idx on msg_messages_data messagedat0_ (cost=0.56..2,081.02 rows=23,958 width=178) (actual time=0.031..29.558 rows=10,883 loops=4)

  • Index Cond: (is_sent = 0)
11. 76.183 76.183 ↑ 1.0 1 43,533 / 4

Index Scan using msg_messages_pkey on msg_messages message1_ (cost=0.56..2.71 rows=1 width=43) (actual time=0.007..0.007 rows=1 loops=43,533)

  • Index Cond: (id = messagedat0_.message_id)
12. 54.416 54.416 ↑ 1.0 1 43,533 / 4

Index Scan using msg_dialogs_pkey on msg_dialogs dialog2_ (cost=0.43..1.55 rows=1 width=22) (actual time=0.005..0.005 rows=1 loops=43,533)

  • Index Cond: (id = message1_.dialog_id)
13. 206.782 206.782 ↑ 1.0 1 43,533 / 4

Index Scan using msg_clients_login_idx on msg_clients client4_ (cost=0.43..1.56 rows=1 width=21) (actual time=0.019..0.019 rows=1 loops=43,533)

  • Index Cond: ((login)::text = (dialog2_.external_id)::text)
14. 1,292.173 1,292.173 ↑ 1.0 1 1,033,738 / 4

Index Only Scan using msg_appeals_pkey on msg_appeals appeal3_ (cost=0.43..1.01 rows=1 width=8) (actual time=0.005..0.005 rows=1 loops=1,033,738)

  • Index Cond: (id = message1_.appeal_id)
  • Heap Fetches: 117473
15. 0.176 0.635 ↑ 1.0 959 4 / 4

Hash (cost=40.59..40.59 rows=959 width=19) (actual time=0.635..0.635 rows=959 loops=4)

  • Buckets: 1024 Batches: 1 Memory Usage: 56kB
16. 0.459 0.459 ↑ 1.0 959 4 / 4

Seq Scan on users user6_ (cost=0.00..40.59 rows=959 width=19) (actual time=0.015..0.459 rows=959 loops=4)

Planning time : 2.700 ms
Execution time : 5,771.000 ms