explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ih7B7

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 372.584 ↑ 1.0 45 1

Limit (cost=130,668.02..130,673.27 rows=45 width=294) (actual time=350.795..372.584 rows=45 loops=1)

2. 0.000 372.576 ↑ 5.7 45 1

Gather Merge (cost=130,668.02..130,697.88 rows=256 width=294) (actual time=350.793..372.576 rows=45 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 0.828 1,035.018 ↑ 3.5 37 3

Sort (cost=129,667.99..129,668.31 rows=128 width=294) (actual time=345.001..345.006 rows=37 loops=3)

  • Sort Key: teaser.created_at DESC
  • Sort Method: top-N heapsort Memory: 70kB
  • Worker 0: Sort Method: top-N heapsort Memory: 69kB
  • Worker 1: Sort Method: quicksort Memory: 61kB
4. 3.619 1,034.190 ↑ 1.3 102 3

Nested Loop (cost=292.30..129,663.84 rows=128 width=294) (actual time=15.964..344.730 rows=102 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
5. 19.617 998.913 ↑ 2.7 959 3

Nested Loop (cost=291.73..113,583.44 rows=2,629 width=302) (actual time=14.774..332.971 rows=959 loops=3)

6. 455.618 467.421 ↑ 1.2 11,375 3

Parallel Bitmap Heap Scan on teaser (cost=291.30..65,653.48 rows=13,699 width=294) (actual time=14.687..155.807 rows=11,375 loops=3)

  • Recheck Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('close'::text))
  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint))
  • Heap Blocks: exact=13739
7. 11.803 11.803 ↓ 1.0 34,125 1

Bitmap Index Scan on teaser_tls (cost=0.00..283.08 rows=32,911 width=0) (actual time=11.802..11.803 rows=34,125 loops=1)

  • Index Cond: (to_tsvector('russian'::regconfig, (title)::text) @@ plainto_tsquery('close'::text))
8. 511.875 511.875 ↓ 0.0 0 34,125

Index Only Scan using idx_16506_idx_teaser_network_relation_temp_teaser_id_network_id on teaser_network_relation (cost=0.43..3.49 rows=1 width=8) (actual time=0.015..0.015 rows=0 loops=34,125)

  • Index Cond: (teaser_id = teaser.id)
  • Filter: (network_id = ANY ('{26,6}'::bigint[]))
  • Rows Removed by Filter: 1
  • Heap Fetches: 25735
9. 31.658 31.658 ↓ 0.0 0 2,878

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.011..0.011 rows=0 loops=2,878)

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