explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PQKQ

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 23,472.401 ↑ 1.0 1 1

Limit (cost=2.29..2,003.50 rows=1 width=196) (actual time=23,472.393..23,472.401 rows=1 loops=1)

2. 23,472.392 23,472.392 ↑ 658.0 1 1

Nested Loop Left Join (cost=2.29..1,316,801.54 rows=658 width=196) (actual time=23,472.391..23,472.392 rows=1 loops=1)

3. 23,471.144 23,471.144 ↑ 658.0 1 1

Nested Loop Left Join (cost=1.86..1,277,818.71 rows=658 width=1,117) (actual time=23,471.144..23,471.144 rows=1 loops=1)

4. 23,470.010 23,470.010 ↑ 658.0 1 1

Nested Loop (cost=1.42..1,276,070.08 rows=658 width=620) (actual time=23,470.009..23,470.010 rows=1 loops=1)

5. 23,469.988 23,469.988 ↑ 658.0 1 1

Nested Loop (cost=0.99..1,276,059.21 rows=658 width=344) (actual time=23,469.988..23,469.988 rows=1 loops=1)

6. 23,469.971 23,469.971 ↑ 658.0 1 1

Index Scan Backward using index_room_peoples_on_last_comment_received_id on public.room_peoples rp (cost=0.56..1,274,355.12 rows=658 width=105) (actual time=23,469.971..23,469.971 rows=1 loops=1)

7. 0.012 0.012 ↑ 1.0 1 1

Index Scan using rooms_pkey on public.rooms r (cost=0.43..2.58 rows=1 width=243) (actual time=0.011..0.012 rows=1 loops=1)