explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 7TNI : LATERAL

Settings
# exclusive inclusive rows x rows loops node
1. 0.394 11.535 ↑ 1.0 836 1

Nested Loop (cost=4.33..3,681.79 rows=836 width=44) (actual time=0.056..11.535 rows=836 loops=1)

2. 0.273 0.273 ↑ 1.0 836 1

Seq Scan on channel (cost=0.00..33.36 rows=836 width=44) (actual time=0.009..0.273 rows=836 loops=1)

3. 0.836 10.868 ↑ 1.0 1 836

Result (cost=4.33..4.34 rows=1 width=8) (actual time=0.012..0.013 rows=1 loops=836)

4.          

Initplan (forResult)

5. 0.836 10.032 ↑ 1.0 1 836

Limit (cost=0.43..4.33 rows=1 width=8) (actual time=0.012..0.012 rows=1 loops=836)

6. 9.196 9.196 ↑ 4,800.0 1 836

Index Only Scan Backward using channel_id_tg_id_idx on message (cost=0.43..18,740.35 rows=4,800 width=8) (actual time=0.011..0.011 rows=1 loops=836)

  • Index Cond: ((channel_id = $0) AND (tg_id IS NOT NULL))
  • Heap Fetches: 787