explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sOhH

Settings
# exclusive inclusive rows x rows loops node
1. 0.056 1.129 ↑ 12.8 4 1

WindowAgg (cost=55.86..58.54 rows=51 width=52) (actual time=1.010..1.129 rows=4 loops=1)

  • Planning time: 1.681 ms
  • Execution time: 1.434 ms
2. 0.153 1.073 ↑ 12.8 4 1

GroupAggregate (cost=55.86..57.39 rows=51 width=52) (actual time=0.974..1.073 rows=4 loops=1)

  • Group Key: l.id, c.id
3. 0.113 0.920 ↑ 1.0 49 1

Sort (cost=55.86..55.99 rows=51 width=36) (actual time=0.899..0.920 rows=49 loops=1)

  • Sort Key: l.id, c.id
  • Sort Method: quicksort Memory: 28kB
4. 0.094 0.807 ↑ 1.0 49 1

Hash Join (cost=37.15..54.41 rows=51 width=36) (actual time=0.694..0.807 rows=49 loops=1)

  • Hash Cond: (r.mail_message_id = m.id)
5. 0.079 0.570 ↑ 1.0 49 1

Hash Join (cost=27.20..43.76 rows=51 width=32) (actual time=0.522..0.570 rows=49 loops=1)

  • Hash Cond: (l.id = c.livechat_channel_id)
6. 0.006 0.006 ↑ 440.0 1 1

Seq Scan on im_livechat_channel l (cost=0.00..14.40 rows=440 width=4) (actual time=0.005..0.006 rows=1 loops=1)

7. 0.066 0.485 ↑ 1.0 49 1

Hash (cost=26.56..26.56 rows=51 width=32) (actual time=0.485..0.485 rows=49 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
8. 0.192 0.419 ↓ 1.0 53 1

Hash Right Join (cost=17.03..26.56 rows=51 width=32) (actual time=0.229..0.419 rows=53 loops=1)

  • Hash Cond: ((mo.id = r.mail_message_id) AND (mo.author_id = c.livechat_operator_id))
9. 0.053 0.053 ↑ 1.1 78 1

Seq Scan on mail_message mo (cost=0.00..8.87 rows=87 width=16) (actual time=0.004..0.053 rows=78 loops=1)

10. 0.046 0.174 ↓ 1.0 53 1

Hash (cost=16.26..16.26 rows=51 width=24) (actual time=0.174..0.174 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
11. 0.076 0.128 ↓ 1.0 53 1

Hash Join (cost=14.05..16.26 rows=51 width=24) (actual time=0.072..0.128 rows=53 loops=1)

  • Hash Cond: (r.mail_channel_id = c.id)
12. 0.021 0.021 ↓ 1.0 53 1

Seq Scan on mail_message_mail_channel_rel r (cost=0.00..1.51 rows=51 width=8) (actual time=0.007..0.021 rows=53 loops=1)

13. 0.016 0.031 ↑ 20.0 9 1

Hash (cost=11.80..11.80 rows=180 width=20) (actual time=0.031..0.031 rows=9 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
14. 0.015 0.015 ↑ 20.0 9 1

Seq Scan on mail_channel c (cost=0.00..11.80 rows=180 width=20) (actual time=0.008..0.015 rows=9 loops=1)

15. 0.055 0.143 ↑ 1.1 78 1

Hash (cost=8.87..8.87 rows=87 width=12) (actual time=0.143..0.143 rows=78 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 12kB
16. 0.088 0.088 ↑ 1.1 78 1

Seq Scan on mail_message m (cost=0.00..8.87 rows=87 width=12) (actual time=0.012..0.088 rows=78 loops=1)