explain.depesz.com

PostgreSQL's explain analyze made readable

Result: W9Rd

Settings
# exclusive inclusive rows x rows loops node
1. 0.047 0.691 ↑ 12.8 4 1

WindowAgg (cost=38.61..41.16 rows=51 width=52) (actual time=0.621..0.691 rows=4 loops=1)

2. 0.095 0.644 ↑ 12.8 4 1

GroupAggregate (cost=38.61..40.01 rows=51 width=52) (actual time=0.587..0.644 rows=4 loops=1)

  • Group Key: c.id
3. 0.059 0.549 ↑ 1.0 49 1

Sort (cost=38.61..38.73 rows=51 width=36) (actual time=0.541..0.549 rows=49 loops=1)

  • Sort Key: c.id
  • Sort Method: quicksort Memory: 28kB
4. 0.071 0.490 ↑ 1.0 49 1

Hash Left Join (cost=26.36..37.16 rows=51 width=36) (actual time=0.315..0.490 rows=49 loops=1)

  • Hash Cond: ((r.mail_message_id = mo.id) AND (c.livechat_operator_id = mo.author_id))
5. 0.063 0.297 ↑ 1.0 49 1

Hash Join (cost=16.19..26.59 rows=51 width=32) (actual time=0.167..0.297 rows=49 loops=1)

  • Hash Cond: (r.mail_channel_id = c.id)
6. 0.106 0.205 ↓ 1.0 53 1

Hash Join (cost=2.15..11.85 rows=51 width=16) (actual time=0.108..0.205 rows=53 loops=1)

  • Hash Cond: (m.id = r.mail_message_id)
7. 0.039 0.039 ↑ 1.1 78 1

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

8. 0.030 0.060 ↓ 1.0 53 1

Hash (cost=1.51..1.51 rows=51 width=8) (actual time=0.060..0.060 rows=53 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
9. 0.030 0.030 ↓ 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.011..0.030 rows=53 loops=1)

10. 0.012 0.029 ↑ 44.8 4 1

Hash (cost=11.80..11.80 rows=179 width=20) (actual time=0.029..0.029 rows=4 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
11. 0.017 0.017 ↑ 44.8 4 1

Seq Scan on mail_channel c (cost=0.00..11.80 rows=179 width=20) (actual time=0.011..0.017 rows=4 loops=1)

  • Filter: (livechat_channel_id IS NOT NULL)
  • Rows Removed by Filter: 5
12. 0.033 0.122 ↑ 1.6 55 1

Hash (cost=8.87..8.87 rows=87 width=16) (actual time=0.122..0.122 rows=55 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 11kB
13. 0.089 0.089 ↑ 1.1 78 1

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