explain.depesz.com

PostgreSQL's explain analyze made readable

Result: FpRE

Settings
# exclusive inclusive rows x rows loops node
1. 0.017 217.313 ↑ 1.0 45 1

Limit (cost=343,380.12..343,385.37 rows=45 width=180) (actual time=185.479..217.313 rows=45 loops=1)

2. 0.000 217.296 ↑ 7.0 270 1

Gather Merge (cost=343,353.86..343,575.78 rows=1,902 width=180) (actual time=185.379..217.296 rows=270 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.286 544.281 ↑ 4.4 217 3

Sort (cost=342,353.84..342,356.22 rows=951 width=180) (actual time=181.410..181.427 rows=217 loops=3)

  • Sort Key: teaser.created_at DESC
  • Sort Method: top-N heapsort Memory: 169kB
  • Worker 0: Sort Method: top-N heapsort Memory: 169kB
  • Worker 1: Sort Method: quicksort Memory: 162kB
4. 7.907 541.995 ↑ 1.4 656 3

Nested Loop (cost=419.87..342,310.68 rows=951 width=180) (actual time=33.172..180.665 rows=656 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
5. 12.220 410.844 ↑ 1.5 3,735 3

Nested Loop (cost=419.30..236,394.31 rows=5,602 width=188) (actual time=22.313..136.948 rows=3,735 loops=3)

6. 187.854 202.908 ↑ 1.1 16,310 3

Parallel Bitmap Heap Scan on teaser (cost=418.87..130,034.92 rows=17,990 width=180) (actual time=21.216..67.636 rows=16,310 loops=3)

  • Recheck Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('Surprising'::text))
  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=17137
7. 15.054 15.054 ↓ 1.1 48,933 1

Bitmap Index Scan on fts_teaser_title (cost=0.00..408.07 rows=43,176 width=0) (actual time=15.054..15.054 rows=48,933 loops=1)

  • Index Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('Surprising'::text))
8. 195.716 195.716 ↓ 0.0 0 48,929

Index Only Scan using idx_16506_idx_teaser_network_relation_temp_teaser_id_network_id on teaser_network_relation (cost=0.43..5.91 rows=1 width=8) (actual time=0.004..0.004 rows=0 loops=48,929)

  • Index Cond: ((teaser_id = teaser.id) AND (network_id = '4'::bigint))
  • Heap Fetches: 11204
9. 123.244 123.244 ↓ 0.0 0 11,204

Index Only Scan using idx_16500_idx_teaser_country_relation_temp_teaser_id_country_id on teaser_country_relation (cost=0.57..18.81 rows=8 width=8) (actual time=0.011..0.011 rows=0 loops=11,204)

  • Index Cond: ((teaser_id = teaser_network_relation.teaser_id) AND (country_id = ANY ('{3,67,115}'::bigint[])))
  • Heap Fetches: 1969