explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 9IB9 : Optimization for: plan #Mnjt

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 0.000 5.038 ↑ 1.3 3 1

Limit (cost=612.68..612.69 rows=4 width=16) (actual time=5.037..5.038 rows=3 loops=1)

2.          

Initplan (for Limit)

3. 0.010 4.913 ↑ 1.0 1 1

Bitmap Heap Scan on research_outputs (cost=124.00..128.01 rows=1 width=8) (actual time=4.912..4.913 rows=1 loops=1)

  • Recheck Cond: (document @@ '''migrat'' & ''amidst'' & ''climat'' & ''rigid'' & ''trap'''::tsquery)
  • Heap Blocks: exact=1
4. 4.903 4.903 ↑ 1.0 1 1

Bitmap Index Scan on research_outputs_3 (cost=0.00..124.00 rows=1 width=0) (actual time=4.903..4.903 rows=1 loops=1)

  • Index Cond: (document @@ '''migrat'' & ''amidst'' & ''climat'' & ''rigid'' & ''trap'''::tsquery)
5. 0.013 5.036 ↑ 2,238.0 3 1

Sort (cost=484.67..501.45 rows=6,714 width=16) (actual time=5.036..5.036 rows=3 loops=1)

  • Sort Key: mentions.posted_at DESC
  • Sort Method: quicksort Memory: 25kB
6. 0.067 5.023 ↑ 2,238.0 3 1

HashAggregate (cost=316.81..383.95 rows=6,714 width=16) (actual time=4.979..5.023 rows=3 loops=1)

  • Group Key: mentions.posted_at, mentions.post_id
7. 4.956 4.956 ↑ 2,238.7 3 1

Index Only Scan using mentiond_test on mentions (cost=0.57..283.24 rows=6,716 width=16) (actual time=4.951..4.956 rows=3 loops=1)

  • Index Cond: (research_output_id = ANY ($0))
  • Heap Fetches: 0
Planning time : 1.202 ms
Execution time : 5.167 ms