explain.depesz.com

PostgreSQL's explain analyze made readable

Result: q3gZ

Settings
# exclusive inclusive rows x rows loops node
1. 0.008 2,737.245 ↑ 1.0 45 1

Limit (cost=1.44..72,191.04 rows=45 width=680) (actual time=2,735.642..2,737.245 rows=45 loops=1)

2. 0.065 2,737.237 ↑ 229.5 45 1

Nested Loop (cost=1.44..16,566,714.19 rows=10,327 width=680) (actual time=2,735.640..2,737.237 rows=45 loops=1)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
3. 0.067 2,736.314 ↑ 2,582.9 39 1

Nested Loop (cost=0.87..10,154,734.34 rows=100,733 width=684) (actual time=2,735.590..2,736.314 rows=39 loops=1)

4. 2,735.677 2,735.677 ↑ 2,008.7 190 1

Index Scan Backward using "idx-teaser-created_at" on teaser (cost=0.43..8,884,728.41 rows=381,657 width=680) (actual time=2,735.540..2,735.677 rows=190 loops=1)

  • Filter: ((clicks >= 180000) AND (clicks <= 510000))
  • Rows Removed by Filter: 7489999
5. 0.570 0.570 ↓ 0.0 0 190

Index Scan using "idx-teaser_network_relation-teaser_id" on teaser_network_relation (cost=0.43..3.32 rows=1 width=4) (actual time=0.003..0.003 rows=0 loops=190)

  • Index Cond: (teaser_id = teaser.id)
  • Filter: (network_id = ANY ('{13,3}'::integer[]))
  • Rows Removed by Filter: 2
6. 0.858 0.858 ↑ 19.0 1 39

Index Scan using "idx-teaser_country_relation-teaser_id" on teaser_country_relation (cost=0.57..63.42 rows=19 width=4) (actual time=0.019..0.022 rows=1 loops=39)

  • Index Cond: (teaser_id = teaser_network_relation.teaser_id)
  • Filter: (country_id = ANY ('{3,67}'::integer[]))
  • Rows Removed by Filter: 41
Planning time : 0.724 ms
Execution time : 2,737.292 ms