explain.depesz.com

PostgreSQL's explain analyze made readable

Result: oX2j

Settings
# exclusive inclusive rows x rows loops node
1. 63.939 1,443.568 ↑ 2.4 43 1

HashAggregate (cost=27,178.74..27,179.79 rows=105 width=12) (actual time=1,443.563..1,443.568 rows=43 loops=1)

  • Group Key: chatuser.externalid
2. 63.602 1,379.629 ↑ 1.7 336,673 1

Hash Join (cost=17.52..24,284.56 rows=578,836 width=8) (actual time=2.699..1,379.629 rows=336,673 loops=1)

  • Hash Cond: (chatroommember.refchatuser = chatuser.id)
3. 36.346 1,315.935 ↑ 1.7 336,673 1

Nested Loop (cost=13.90..22,700.16 rows=578,836 width=8) (actual time=2.589..1,315.935 rows=336,673 loops=1)

4. 14.584 53.289 ↑ 1.0 61,315 1

Hash Join (cost=13.62..2,472.35 rows=61,702 width=12) (actual time=0.319..53.289 rows=61,315 loops=1)

  • Hash Cond: (chatroommessage.refchatroom = chatroom.id)
5. 38.408 38.408 ↑ 1.0 61,315 1

Seq Scan on chatroommessage (cost=0.00..2,295.31 rows=61,702 width=8) (actual time=0.007..38.408 rows=61,315 loops=1)

  • Filter: ((deleted IS FALSE) AND (datetime < (now() - '1 mon'::interval)))
  • Rows Removed by Filter: 474
6. 0.132 0.297 ↑ 1.0 472 1

Hash (cost=7.72..7.72 rows=472 width=4) (actual time=0.296..0.297 rows=472 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 25kB
7. 0.165 0.165 ↑ 1.0 472 1

Seq Scan on chatroom (cost=0.00..7.72 rows=472 width=4) (actual time=0.007..0.165 rows=472 loops=1)

  • Filter: (assistance IS FALSE)
8. 1,226.300 1,226.300 ↓ 5.0 5 61,315

Index Scan using chatroommember_pkey on chatroommember (cost=0.28..0.32 rows=1 width=12) (actual time=0.007..0.020 rows=5 loops=61,315)

  • Index Cond: (refchatroom = chatroommessage.refchatroom)
  • Filter: (lastmessageseen < chatroommessage.id)
  • Rows Removed by Filter: 23
9. 0.041 0.092 ↑ 1.0 105 1

Hash (cost=2.31..2.31 rows=105 width=8) (actual time=0.092..0.092 rows=105 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 13kB
10. 0.051 0.051 ↑ 1.0 105 1

Seq Scan on chatuser (cost=0.00..2.31 rows=105 width=8) (actual time=0.010..0.051 rows=105 loops=1)

  • Filter: ((externaltable)::text = 'utilisateurs'::text)
Planning time : 1.347 ms
Execution time : 1,443.689 ms