explain.depesz.com

PostgreSQL's explain analyze made readable

Result: VgIp

Settings
# exclusive inclusive rows x rows loops node
1. 0.000 23.760 ↑ 6.4 7 1

Limit (cost=64,520.23..64,520.34 rows=45 width=680) (actual time=23.758..23.760 rows=7 loops=1)

2. 0.012 23.760 ↑ 7.4 7 1

Sort (cost=64,520.23..64,520.36 rows=52 width=680) (actual time=23.758..23.760 rows=7 loops=1)

  • Sort Key: teaser.created_at DESC
  • Sort Method: quicksort Memory: 26kB
3. 0.008 23.748 ↑ 7.4 7 1

Nested Loop (cost=8,391.46..64,518.74 rows=52 width=680) (actual time=23.274..23.748 rows=7 loops=1)

  • Join Filter: (teaser.id = teaser_country_relation.teaser_id)
4. 0.006 23.632 ↑ 84.0 6 1

Nested Loop (cost=8,390.89..32,437.52 rows=504 width=684) (actual time=23.242..23.632 rows=6 loops=1)

5. 0.134 23.307 ↑ 65.8 29 1

Bitmap Heap Scan on teaser (cost=8,390.46..16,411.82 rows=1,908 width=680) (actual time=23.187..23.307 rows=29 loops=1)

  • Recheck Cond: ((to_tsvector('english'::regconfig, (title)::text) @@ plainto_tsquery('bc'::text)) AND (clicks >= 180000) AND (clicks <= 510000))
  • Heap Blocks: exact=29
6. 0.133 23.173 ↓ 0.0 0 1

BitmapAnd (cost=8,390.46..8,390.46 rows=1,908 width=0) (actual time=23.173..23.173 rows=0 loops=1)

7. 0.121 0.121 ↑ 59.8 669 1

Bitmap Index Scan on search_index (cost=0.00..384.25 rows=40,000 width=0) (actual time=0.121..0.121 rows=669 loops=1)

  • Index Cond: (to_tsvector('english'::regconfig, (title)::text) @@ plainto_tsquery('bc'::text))
8. 22.919 22.919 ↑ 1.2 330,001 1

Bitmap Index Scan on "idx-teaser-clicks" (cost=0.00..8,005.00 rows=381,657 width=0) (actual time=22.919..22.919 rows=330,001 loops=1)

  • Index Cond: ((clicks >= 180000) AND (clicks <= 510000))
9. 0.319 0.319 ↓ 0.0 0 29

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.010..0.011 rows=0 loops=29)

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

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.016..0.018 rows=1 loops=6)

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