explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8FQJ

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.325 166.012 ↓ 10.0 10 1

Limit (cost=8,739.75..8,739.75 rows=1 width=380) (actual time=166.009..166.012 rows=10 loops=1)

2. 29.986 165.687 ↓ 5.3 14,010 1

Sort (cost=8,733.17..8,739.75 rows=2,634 width=380) (actual time=164.645..165.687 rows=14,010 loops=1)

  • Sort Key: created_at DESC
  • Sort Method: top-N heapsort Memory: 15217kB
3. 110.281 135.701 ↓ 24.6 64,765 1

Bitmap Heap Scan on chat_messages (cost=71.00..8,583.52 rows=2,634 width=380) (actual time=29.046..135.701 rows=64,765 loops=1)

  • Recheck Cond: ((main_room_id = '18d1b458-523e-4594-b473-d0ab4f27768c'::uuid) AND (to_tsvector('russian'::regconfig, (content ->> 'text'::text)) @@ '''explicabo'''::tsquery))
  • Heap Blocks: exact=22169
4. 25.420 25.420 ↓ 24.6 64,765 1

Bitmap Index Scan on chat_messages_main_room_id_to_tsvector_idx (cost=0.00..70.34 rows=2,634 width=0) (actual time=25.420..25.420 rows=64,765 loops=1)

  • Index Cond: ((main_room_id = '18d1b458-523e-4594-b473-d0ab4f27768c'::uuid) AND (to_tsvector('russian'::regconfig, (content ->> 'text'::text)) @@ '''explicabo'''::tsquery))