explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 0hyL : dispora stream query

Settings
# exclusive inclusive rows x rows loops node
1. 0.051 7,407.230 ↑ 1.0 15 1

Limit (cost=90,856.56..90,857.23 rows=15 width=1,004) (actual time=7,407.081..7,407.230 rows=15 loops=1)

2. 0.095 7,407.179 ↑ 1,699.8 15 1

Unique (cost=90,856.56..92,003.92 rows=25,497 width=1,004) (actual time=7,407.065..7,407.179 rows=15 loops=1)

3. 1,067.461 7,407.084 ↑ 1,274.8 20 1

Sort (cost=90,856.56..90,920.30 rows=25,497 width=1,004) (actual time=7,407.028..7,407.084 rows=20 loops=1)

  • Sort Key: posts.created_at DESC, posts.id DESC, posts.author_id, posts.public, posts.guid, posts.text, posts.updated_at, posts.provider_display_name, posts.root_guid, posts.likes_count, posts.comments_count, posts.o_embed_cache_id, posts.reshares_count, posts.interacted_at, posts.tweet_id, posts.open_graph_cache_id, posts.tumblr_ids
  • Sort Method: external sort Disk: 12200kB
4. 219.323 6,339.623 ↓ 1.2 30,022 1

Merge Join (cost=16,834.33..77,744.93 rows=25,497 width=1,004) (actual time=581.082..6,339.623 rows=30,022 loops=1)

  • Merge Cond: (posts.id = taggings.taggable_id)
5. 5,513.916 5,513.916 ↓ 1.0 452,645 1

Index Scan Backward using posts_pkey on posts (cost=0.42..61,898.37 rows=450,502 width=1,000) (actual time=0.304..5,513.916 rows=452,645 loops=1)

  • Filter: (public AND (author_id <> 12457) AND (id <> 20477) AND (created_at < '2019-01-06 20:40:17'::timestamp without time zone) AND ((type)::text = ANY ('{StatusMessage,Reshare}'::text[])) AND ((type)::text = 'StatusMessage'::text))
  • Rows Removed by Filter: 52258
6. 83.736 606.384 ↓ 1.1 30,184 1

Sort (cost=14,322.74..14,394.04 rows=28,520 width=4) (actual time=565.028..606.384 rows=30,184 loops=1)

  • Sort Key: taggings.taggable_id DESC
  • Sort Method: quicksort Memory: 2183kB
7. 505.651 522.648 ↓ 1.1 30,184 1

Bitmap Heap Scan on taggings (cost=664.53..12,212.31 rows=28,520 width=4) (actual time=19.474..522.648 rows=30,184 loops=1)

  • Recheck Cond: (tag_id = ANY ('{179,12,145,13036,112,107,110,2,101,98}'::integer[]))
  • Filter: ((taggable_type)::text = 'Post'::text)
  • Rows Removed by Filter: 812
  • Heap Blocks: exact=8024
8. 16.997 16.997 ↓ 1.1 31,022 1

Bitmap Index Scan on index_taggings_on_tag_id (cost=0.00..657.40 rows=28,951 width=0) (actual time=16.997..16.997 rows=31,022 loops=1)

  • Index Cond: (tag_id = ANY ('{179,12,145,13036,112,107,110,2,101,98}'::integer[]))