explain.depesz.com

PostgreSQL's explain analyze made readable

Result: CNVh

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 213.017 ↑ 1.0 45 1

Limit (cost=335,269.43..335,274.68 rows=45 width=179) (actual time=182.172..213.017 rows=45 loops=1)

2. 0.000 213.001 ↑ 6.5 270 1

Gather Merge (cost=335,243.18..335,449.00 rows=1,764 width=179) (actual time=182.074..213.001 rows=270 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 2.520 536.226 ↑ 4.1 217 3

Sort (cost=334,243.16..334,245.36 rows=882 width=179) (actual time=178.723..178.742 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: 160kB
4. 6.557 533.706 ↑ 1.3 656 3

Nested Loop (cost=413.59..334,203.13 rows=882 width=179) (actual time=31.009..177.902 rows=656 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
5. 11.008 403.905 ↑ 1.4 3,735 3

Nested Loop (cost=413.03..232,961.56 rows=5,354 width=187) (actual time=21.905..134.635 rows=3,735 loops=3)

6. 183.543 197.181 ↑ 1.1 16,310 3

Parallel Bitmap Heap Scan on teaser (cost=412.59..128,096.26 rows=17,648 width=179) (actual time=20.922..65.727 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=17431
7. 13.638 13.638 ↓ 1.2 48,933 1

Bitmap Index Scan on fts_teaser_title (cost=0.00..402.00 rows=42,367 width=0) (actual time=13.638..13.638 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.94 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.010..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