explain.depesz.com

PostgreSQL's explain analyze made readable

Result: sIXX

Settings
# exclusive inclusive rows x rows loops node
1. 0.046 6,396.986 ↑ 1.0 45 1

Limit (cost=269,491.76..336,614.33 rows=45 width=180) (actual time=5,161.047..6,396.986 rows=45 loops=1)

2. 0.000 6,396.940 ↑ 10.1 225 1

Gather Merge (cost=1,001.46..3,404,861.78 rows=2,282 width=180) (actual time=53.814..6,396.940 rows=225 loops=1)

  • Workers Planned: 2
  • Workers Launched: 2
3. 5.881 16,337.949 ↑ 12.4 77 3

Nested Loop (cost=1.44..3,403,598.35 rows=951 width=180) (actual time=18.060..5,445.983 rows=77 loops=3)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 10.501 16,314.831 ↑ 10.7 522 3

Nested Loop (cost=0.87..3,297,681.99 rows=5,602 width=188) (actual time=7.338..5,438.277 rows=522 loops=3)

5. 16,265.805 16,265.805 ↑ 7.0 2,568 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.375..5,421.935 rows=2,568 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: 346448
6. 38.525 38.525 ↓ 0.0 0 7,705

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.005..0.005 rows=0 loops=7,705)

  • Index Cond: ((teaser_id = teaser.id) AND (network_id = '4'::bigint))
  • Heap Fetches: 1567
7. 17.237 17.237 ↓ 0.0 0 1,567

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

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