explain.depesz.com

PostgreSQL's explain analyze made readable

Result: iVj4

Settings
# exclusive inclusive rows x rows loops node
1. 0.016 4,331.538 ↑ 1.0 45 1

Limit (cost=265,484.98..265,490.23 rows=45 width=294) (actual time=4,294.382..4,331.538 rows=45 loops=1)

2. 0.000 4,331.522 ↑ 12.0 45 1

Gather Merge (cost=265,484.98..265,547.75 rows=538 width=294) (actual time=4,294.374..4,331.522 rows=45 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 1.962 12,873.441 ↑ 7.9 34 3

Sort (cost=264,484.96..264,485.63 rows=269 width=294) (actual time=4,291.142..4,291.147 rows=34 loops=3)

  • Sort Key: teaser.created_at DESC
  • Sort Method: top-N heapsort Memory: 70kB
  • Worker 0: Sort Method: top-N heapsort Memory: 70kB
  • Worker 1: Sort Method: top-N heapsort Memory: 71kB
4. 17.997 12,871.479 ↑ 1.3 208 3

Nested Loop (cost=618.54..264,476.22 rows=269 width=294) (actual time=45.147..4,290.493 rows=208 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
5. 40.968 11,688.864 ↑ 2.3 2,457 3

Nested Loop (cost=617.98..230,632.91 rows=5,532 width=302) (actual time=35.328..3,896.288 rows=2,457 loops=3)

6. 7,250.539 7,272.990 ↑ 1.3 23,521 3

Parallel Bitmap Heap Scan on teaser (cost=617.54..133,547.97 rows=29,718 width=294) (actual time=34.894..2,424.330 rows=23,521 loops=3)

  • Recheck Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('open'::text))
  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint))
  • Rows Removed by Filter: 1
  • Heap Blocks: exact=21820
7. 22.451 22.451 ↑ 1.0 70,567 1

Bitmap Index Scan on teaser_tls (cost=0.00..599.71 rows=71,395 width=0) (actual time=22.451..22.451 rows=70,567 loops=1)

  • Index Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('open'::text))
8. 4,374.906 4,374.906 ↓ 0.0 0 70,563

Index Only Scan using idx_16506_idx_teaser_network_relation_temp_teaser_id_network_id on teaser_network_relation (cost=0.43..3.26 rows=1 width=8) (actual time=0.062..0.062 rows=0 loops=70,563)

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

Index Only Scan using idx_16500_idx_teaser_country_relation_temp_teaser_id_country_id on teaser_country_relation (cost=0.57..6.09 rows=2 width=8) (actual time=0.158..0.158 rows=0 loops=7,371)

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