explain.depesz.com

PostgreSQL's explain analyze made readable

Result: itGj : Optimization for: plan #ohOl

Settings

Optimization path:

# exclusive inclusive rows x rows loops node
1. 169,358.038 233,654.004 ↓ 1.5 244 1

GroupAggregate (cost=551,472.76..551,550.67 rows=165 width=15) (actual time=140,125.663..233,654.004 rows=244 loops=1)

  • Group Key: country_profiles.country
  • Functions: 12
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 2.378 ms, Inlining 12.750 ms, Optimization 42.308 ms, Emission 24.429 ms, Total 81.865 ms
2.          

Initplan (for GroupAggregate)

3. 2,341.330 2,341.330 ↓ 1.4 19,051,903 1

Index Only Scan using research_outputs_16 on research_outputs (cost=0.56..532,621.22 rows=13,461,033 width=8) (actual time=0.033..2,341.330 rows=19,051,903 loops=1)

  • Index Cond: ((output_type = 'article'::text) AND (books = false))
  • Heap Fetches: 0
4. 27,367.512 61,954.636 ↓ 6,207.7 63,125,863 1

Sort (cost=18,851.53..18,876.96 rows=10,169 width=24) (actual time=55,176.469..61,954.636 rows=63,125,863 loops=1)

  • Sort Key: country_profiles.country
  • Sort Method: external merge Disk: 2,149,520kB
5. 34,587.124 34,587.124 ↓ 6,207.7 63,125,863 1

Index Scan using country_profiles_0 on country_profiles (cost=0.57..18,174.69 rows=10,169 width=24) (actual time=3,433.437..34,587.124 rows=63,125,863 loops=1)

  • Index Cond: ((research_output_id = ANY ($0)) AND (post_type = 'tweet'::text))
Execution time : 233,879.921 ms