explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 86ll

Settings
# exclusive inclusive rows x rows loops node
1. 0.001 1,485.290 ↑ 22.5 2 1

Limit (cost=261,024.62..261,024.73 rows=45 width=680) (actual time=1,485.289..1,485.290 rows=2 loops=1)

2. 0.007 1,485.289 ↑ 26.0 2 1

Sort (cost=261,024.62..261,024.75 rows=52 width=680) (actual time=1,485.289..1,485.289 rows=2 loops=1)

  • Sort Key: teaser.created_at DESC
  • Sort Method: quicksort Memory: 25kB
3. 0.004 1,485.282 ↑ 26.0 2 1

Nested Loop (cost=1.44..261,023.14 rows=52 width=680) (actual time=593.220..1,485.282 rows=2 loops=1)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 0.014 1,485.257 ↑ 504.0 1 1

Nested Loop (cost=0.87..228,941.92 rows=504 width=684) (actual time=593.207..1,485.257 rows=1 loops=1)

5. 1,485.231 1,485.231 ↑ 1,908.0 1 1

Index Scan using "idx-teaser-clicks" on teaser (cost=0.43..212,916.21 rows=1,908 width=680) (actual time=593.182..1,485.231 rows=1 loops=1)

  • Index Cond: ((clicks >= 180000) AND (clicks <= 510000))
  • Filter: (to_tsvector((title)::text) @@ plainto_tsquery('P84wE'::text))
  • Rows Removed by Filter: 330000
6. 0.012 0.012 ↑ 1.0 1 1

Index Scan using "idx-teaser_network_relation-teaser_id" on teaser_network_relation (cost=0.43..8.39 rows=1 width=4) (actual time=0.012..0.012 rows=1 loops=1)

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

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.010..0.021 rows=2 loops=1)

  • Index Cond: (teaser_id = teaser_network_relation.teaser_id)
  • Filter: (country_id = ANY ('{3,67}'::integer[]))
  • Rows Removed by Filter: 70
Planning time : 0.512 ms
Execution time : 1,485.332 ms