explain.depesz.com

PostgreSQL's explain analyze made readable

Result: qDq6

Settings

Optimization(s) for this plan:

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

Limit (cost=907.12..14,162.55 rows=45 width=680) (actual rows= loops=)

2. 0.000 0.000 ↓ 0.0

Merge Join (cost=907.12..3,042,880.51 rows=10,327 width=680) (actual rows= loops=)

  • Merge Cond: (teaser_network_relation.teaser_id = teaser.id)
3. 0.000 0.000 ↓ 0.0

Merge Join (cost=694.35..2,764,386.45 rows=390,599 width=8) (actual rows= loops=)

  • Merge Cond: (teaser_network_relation.teaser_id = teaser_country_relation.teaser_id)
4. 0.000 0.000 ↓ 0.0

Index Scan using "idx-teaser_network_relation-teaser_id" on teaser_network_relation (cost=0.43..541,976.10 rows=2,111,479 width=4) (actual rows= loops=)

  • Filter: (network_id = ANY ('{13,3}'::integer[]))
5. 0.000 0.000 ↓ 0.0

Index Scan using "idx-teaser_country_relation-teaser_id" on teaser_country_relation (cost=0.57..2,705,912.58 rows=820,186 width=4) (actual rows= loops=)

  • Filter: (country_id = ANY ('{3,67}'::integer[]))
6. 0.000 0.000 ↓ 0.0

Index Scan using teaser_pkey on teaser (cost=0.43..442,873.41 rows=381,657 width=680) (actual rows= loops=)

  • Filter: ((clicks >= 180000) AND (clicks <= 510000))