explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xoH : timestamp with time zone

Settings
# exclusive inclusive rows x rows loops node
1. 0.011 100,846.222 ↓ 12.0 12 1

Limit (cost=10,762.13..10,762.13 rows=1 width=79) (actual time=100,846.208..100,846.222 rows=12 loops=1)

2. 0.320 100,846.211 ↓ 12.0 12 1

Sort (cost=10,762.13..10,762.13 rows=1 width=79) (actual time=100,846.206..100,846.211 rows=12 loops=1)

  • Sort Key: (count(places.moment_id))
  • Sort Method: top-N heapsort Memory: 18kB
3. 3.873 100,845.891 ↓ 382.0 382 1

HashAggregate (cost=10,762.12..10,762.13 rows=1 width=79) (actual time=100,845.606..100,845.891 rows=382 loops=1)

4. 47.925 100,842.018 ↓ 559.0 559 1

Nested Loop (cost=0.00..10,762.12 rows=1 width=79) (actual time=1,544.667..100,842.018 rows=559 loops=1)

5. 38.698 24,532.503 ↓ 65.3 17,690 1

Nested Loop (cost=0.00..9,523.27 rows=271 width=104) (actual time=1,513.928..24,532.503 rows=17,690 loops=1)

6. 157.476 9,278.379 ↓ 237.2 7,354 1

Nested Loop (cost=0.00..8,893.88 rows=31 width=79) (actual time=1,513.889..9,278.379 rows=7,354 loops=1)

7. 6,979.722 6,979.722 ↓ 164.2 33,987 1

Seq Scan on foursq_categories (cost=0.00..8,077.23 rows=207 width=25) (actual time=16.008..6,979.722 rows=33,987 loops=1)

  • Filter: ("primary" AND ((name)::text @@ to_tsquery('Restaurant'::text)))
8. 2,141.181 2,141.181 ↓ 0.0 0 33,987

Index Scan using foursquare_pkey on foursquare (cost=0.00..3.94 rows=1 width=54) (actual time=0.063..0.063 rows=0 loops=33,987)

  • Index Cond: (foursquare.foursq_id = foursq_categories.foursq_id)
  • Filter: (((foursquare.country)::text = 'USA'::text) OR ((foursquare.country)::text = 'United States'::text))
9. 15,215.426 15,215.426 ↑ 4.5 2 7,354

Index Scan using places_foursq_id_idx on places (cost=0.00..20.27 rows=9 width=75) (actual time=1.055..2.069 rows=2 loops=7,354)

  • Index Cond: (places.foursq_id = foursq_categories.foursq_id)
10. 76,261.590 76,261.590 ↓ 0.0 0 17,690

Index Scan using blocks_pkey on blocks (cost=0.00..4.57 rows=1 width=25) (actual time=4.310..4.311 rows=0 loops=17,690)

  • Index Cond: (blocks.block_id = places.block_id)
  • Filter: ((timezone((blocks.timezone)::text, blocks.created))::date = '2012-02-08'::date)