explain.depesz.com

PostgreSQL's explain analyze made readable

Result: IF7Y : Optimization for: plan #ZBO7

Settings

Optimization path:

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.000 10.711 ↑ 1.0 31 1

Limit (cost=34,452.87..34,453.10 rows=31 width=16) (actual time=10.685..10.711 rows=31 loops=1)

2.          

Initplan (for Limit)

3. 1.187 1.417 ↑ 4.9 531 1

Bitmap Heap Scan on research_outputs (cost=82.03..10,387.01 rows=2,624 width=8) (actual time=0.375..1.417 rows=531 loops=1)

  • Recheck Cond: (altmetric_jid = ANY ('{4f6fa62a3cf058f610007eea,4f6fa92b3cf058f61000ddc3,4f6fa8393cf058f61000be70}'::text[]))
  • Heap Blocks: exact=516
4. 0.230 0.230 ↑ 4.9 531 1

Bitmap Index Scan on research_outputs_1 (cost=0.00..81.38 rows=2,624 width=0) (actual time=0.229..0.230 rows=531 loops=1)

  • Index Cond: (altmetric_jid = ANY ('{4f6fa62a3cf058f610007eea,4f6fa92b3cf058f61000ddc3,4f6fa8393cf058f61000be70}'::text[]))
5. 0.015 10.702 ↑ 160.6 31 1

Unique (cost=24,065.85..24,103.20 rows=4,978 width=16) (actual time=10.684..10.702 rows=31 loops=1)

6. 0.114 10.687 ↑ 160.6 31 1

Sort (cost=24,065.85..24,078.30 rows=4,979 width=16) (actual time=10.682..10.687 rows=31 loops=1)

  • Sort Key: mentions.posted_at DESC, mentions.post_id
  • Sort Method: quicksort Memory: 34kB
7. 5.244 10.573 ↑ 25.8 193 1

Bitmap Heap Scan on mentions (cost=173.04..23,760.10 rows=4,979 width=16) (actual time=5.736..10.573 rows=193 loops=1)

  • Recheck Cond: (research_output_id = ANY ($0))
  • Filter: (post_type = ANY ('{tweet,linkedin,pinterest,rdt,fbwall,weibo}'::text[]))
  • Rows Removed by Filter: 4,344
  • Heap Blocks: exact=1,310
8. 5.329 5.329 ↑ 1.4 4,537 1

Bitmap Index Scan on mentions_constraint_0 (cost=0.00..171.80 rows=6,151 width=0) (actual time=5.329..5.329 rows=4,537 loops=1)

  • Index Cond: (research_output_id = ANY ($0))
Planning time : 0.676 ms
Execution time : 10.776 ms