explain.depesz.com

PostgreSQL's explain analyze made readable

Result: Qdww

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 8,886.875 ↑ 1.0 45 1

Limit (cost=1.44..51,241.54 rows=45 width=680) (actual time=8,885.447..8,886.875 rows=45 loops=1)

2. 175.720 8,886.864 ↑ 1,088.6 45 1

Nested Loop (cost=1.44..55,778,835.42 rows=48,986 width=680) (actual time=8,885.446..8,886.864 rows=45 loops=1)

3. 0.000 8,271.861 ↑ 1.2 439,283 1

Nested Loop (cost=0.87..22,829,869.69 rows=514,544 width=684) (actual time=1,209.760..8,271.861 rows=439,283 loops=1)

4. 2,369.020 2,369.020 ↑ 1.3 3,297,551 1

Index Scan Backward using "idx-teaser-created_at" on teaser (cost=0.43..10,153,988.72 rows=4,311,019 width=680) (actual time=1,209.682..2,369.020 rows=3,297,551 loops=1)

  • Filter: ((clicks >= 0) AND (clicks <= 4000000))
  • Rows Removed by Filter: 3999996
5. 6,595.102 6,595.102 ↓ 0.0 0 3,297,551

Index Scan using "idx-teaser_network_relation-teaser_id" on teaser_network_relation (cost=0.43..2.93 rows=1 width=4) (actual time=0.002..0.002 rows=0 loops=3,297,551)

  • Index Cond: (teaser_id = teaser.id)
  • Filter: (network_id = 7)
  • Rows Removed by Filter: 2
6. 439.283 439.283 ↓ 0.0 0 439,283

Index Scan using "idx-teaser_country_relation-teaser_id" on teaser_country_relation (cost=0.57..63.85 rows=19 width=4) (actual time=0.001..0.001 rows=0 loops=439,283)

  • Index Cond: (teaser_id = teaser.id)
  • Filter: (country_id = ANY ('{3,67}'::integer[]))
  • Rows Removed by Filter: 0