explain.depesz.com

PostgreSQL's explain analyze made readable

Result: A66k

Settings
# exclusive inclusive rows x rows loops node
1. 0.024 2,145.621 ↑ 1.0 45 1

Limit (cost=68,124.04..135,246.61 rows=45 width=180) (actual time=964.224..2,145.621 rows=45 loops=1)

2. 0.000 2,145.597 ↑ 25.4 90 1

Gather Merge (cost=1,001.46..3,404,861.78 rows=2,282 width=180) (actual time=50.789..2,145.597 rows=90 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.499 5,309.925 ↑ 30.7 31 3

Nested Loop (cost=1.44..3,403,598.35 rows=951 width=180) (actual time=17.351..1,769.975 rows=31 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 3.019 5,302.656 ↑ 29.2 192 3

Nested Loop (cost=0.87..3,297,681.99 rows=5,602 width=188) (actual time=7.796..1,767.552 rows=192 loops=3)

5. 5,285.481 5,285.481 ↑ 15.2 1,180 3

Parallel Index Scan Backward using teaser_created_at on teaser (cost=0.43..3,191,322.60 rows=17,990 width=180) (actual time=3.840..1,761.827 rows=1,180 loops=3)

  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint) AND (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('Surprising'::text)))
  • Rows Removed by Filter: 119923
6. 14.156 14.156 ↓ 0.0 0 3,539

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=3,539)

  • Index Cond: ((teaser_id = teaser.id) AND (network_id = '4'::bigint))
  • Heap Fetches: 577
7. 5.770 5.770 ↓ 0.0 0 577

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.010 rows=0 loops=577)

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