explain.depesz.com

PostgreSQL's explain analyze made readable

Result: h8ko

Settings
# exclusive inclusive rows x rows loops node
1. 0.037 18,194.396 ↑ 1.0 45 1

Limit (cost=1,001.46..204,182.73 rows=45 width=179) (actual time=7,630.306..18,194.396 rows=45 loops=1)

2. 0.000 18,194.359 ↑ 15.8 45 1

Gather Merge (cost=1,001.46..3,202,235.27 rows=709 width=179) (actual time=7,630.304..18,194.359 rows=45 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 3.805 45,213.501 ↑ 16.4 18 3

Nested Loop (cost=1.44..3,201,153.41 rows=295 width=179) (actual time=4,824.542..15,071.167 rows=18 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 16.047 45,184.596 ↑ 17.6 335 3

Nested Loop Semi Join (cost=0.87..3,172,627.73 rows=5,893 width=187) (actual time=28.121..15,061.532 rows=335 loops=3)

5. 45,002.661 45,002.661 ↑ 10.4 3,072 3

Parallel Index Scan Backward using teaser_created_at on teaser (cost=0.43..3,082,475.40 rows=31,941 width=179) (actual time=10.273..15,000.887 rows=3,072 loops=3)

  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint) AND (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('open'::text)))
  • Rows Removed by Filter: 626808
6. 165.888 165.888 ↓ 0.0 0 9,216

Index Only Scan using idx_17262_idx_teaser_network_relation_temp_teaser_id_network_id on teaser_network_relation (cost=0.43..2.82 rows=1 width=8) (actual time=0.018..0.018 rows=0 loops=9,216)

  • Index Cond: (teaser_id = teaser.id)
  • Filter: (network_id = ANY ('{6,15}'::bigint[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 9259
7. 25.100 25.100 ↓ 0.0 0 1,004

Index Only Scan using idx_17238_idx_teaser_country_relation_temp_teaser_id_country_id on teaser_country_relation (cost=0.57..4.83 rows=1 width=8) (actual time=0.025..0.025 rows=0 loops=1,004)

  • Index Cond: ((teaser_id = teaser_network_relation.teaser_id) AND (country_id = ANY ('{3,67}'::bigint[])))
  • Heap Fetches: 55
Planning time : 0.925 ms
Execution time : 18,194.471 ms