explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ohOl

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 401.335 313,692.968 ↓ 1.2 244 1

GroupAggregate (cost=551,476.42..551,707.20 rows=200 width=15) (actual time=293,797.096..313,692.968 rows=244 loops=1)

  • Group Key: country_profiles.country
  • Functions: 13
  • Options: Inlining true, Optimization true, Expressions true, Deforming true
  • Timing: Generation 2.406 ms, Inlining 46.768 ms, Optimization 40.041 ms, Emission 32.139 ms, Total 121.354 ms
2. 2,014.065 313,291.633 ↓ 553.2 5,623,790 1

Unique (cost=551,476.42..551,552.71 rows=10,166 width=24) (actual time=278,639.394..313,291.633 rows=5,623,790 loops=1)

3.          

Initplan (for Unique)

4. 2,900.648 2,900.648 ↓ 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.771..2,900.648 rows=19,051,903 loops=1)

  • Index Cond: ((output_type = 'article'::text) AND (books = false))
  • Heap Fetches: 0
5. 238,988.473 308,376.920 ↓ 6,206.5 63,125,863 1

Sort (cost=18,855.20..18,880.63 rows=10,171 width=24) (actual time=278,639.392..308,376.920 rows=63,125,863 loops=1)

  • Sort Key: country_profiles.country, country_profiles.profile_id
  • Sort Method: external merge Disk: 2,149,520kB
6. 69,388.447 69,388.447 ↓ 6,206.5 63,125,863 1

Index Scan using country_profiles_0 on country_profiles (cost=0.57..18,178.21 rows=10,171 width=24) (actual time=4,067.564..69,388.447 rows=63,125,863 loops=1)

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