explain.depesz.com

PostgreSQL's explain analyze made readable

Result: PupA

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 0.000 ↓ 0.0

Limit (cost=544,789.22..544,789.34 rows=45 width=304) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Sort (cost=544,788.55..544,792.90 rows=1,742 width=304) (actual rows= loops=)

  • Sort Key: ((teaser.created_at <=> '1'::bigint)) DESC
3. 0.000 0.000 ↓ 0.0

Nested Loop (cost=125,623.03..544,707.55 rows=1,742 width=304) (actual rows= loops=)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 0.000 0.000 ↓ 0.0

Hash Join (cost=125,622.47..312,007.53 rows=10,546 width=304) (actual rows= loops=)

  • Hash Cond: (teaser_network_relation.teaser_id = teaser.id)
5. 0.000 0.000 ↓ 0.0

Seq Scan on teaser_network_relation (cost=0.00..176,836.06 rows=3,637,714 width=8) (actual rows= loops=)

  • Filter: (network_id = '4'::bigint)
6. 0.000 0.000 ↓ 0.0

Hash (cost=125,188.90..125,188.90 rows=34,685 width=296) (actual rows= loops=)

7. 0.000 0.000 ↓ 0.0

Bitmap Heap Scan on teaser (cost=345.14..125,188.90 rows=34,685 width=296) (actual rows= loops=)

  • Recheck Cond: (teaser_tls @@ plainto_tsquery('Surprising'::text))
  • Filter: ((clicks >= '0'::bigint) AND (clicks <= '4000000'::bigint))
8. 0.000 0.000 ↓ 0.0

Bitmap Index Scan on teaser_rum_created_at (cost=0.00..336.46 rows=34,695 width=0) (actual rows= loops=)

  • Index Cond: (teaser_tls @@ plainto_tsquery('Surprising'::text))
9. 0.000 0.000 ↓ 0.0

Index Only Scan using idx_16500_idx_teaser_country_relation_temp_teaser_id_country_id on teaser_country_relation (cost=0.57..21.96 rows=8 width=8) (actual rows= loops=)

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