explain.depesz.com

PostgreSQL's explain analyze made readable

Result: wZZh

Settings
# exclusive inclusive rows x rows loops node
1. 0.007 1,768.194 ↓ 1.4 20 1

Limit (cost=482,716.55..482,716.62 rows=14 width=8) (actual time=1,768.182..1,768.194 rows=20 loops=1)

2. 0.006 1,768.187 ↓ 1.4 20 1

Unique (cost=482,716.55..482,716.62 rows=14 width=8) (actual time=1,768.181..1,768.187 rows=20 loops=1)

3. 17.769 1,768.181 ↓ 1.6 23 1

Sort (cost=482,716.55..482,716.58 rows=14 width=8) (actual time=1,768.181..1,768.181 rows=23 loops=1)

  • Sort Key: statuses.id DESC
  • Sort Method: quicksort Memory: 4146kB
4. 14.097 1,750.412 ↓ 3,975.9 55,663 1

Nested Loop Left Join (cost=1,633.35..482,716.28 rows=14 width=8) (actual time=16.662..1,750.412 rows=55,663 loops=1)

  • Filter: (accounts.silenced_at IS NULL)
  • Rows Removed by Filter: 113
5. 30.653 1,513.211 ↓ 3,718.4 55,776 1

Nested Loop (cost=1,632.93..482,614.71 rows=15 width=16) (actual time=16.637..1,513.211 rows=55,776 loops=1)

  • Join Filter: (statuses_tags.status_id = media_attachments.status_id)
6. 20.415 1,013.243 ↓ 384.4 42,665 1

Nested Loop (cost=1,632.50..481,842.32 rows=111 width=24) (actual time=16.577..1,013.243 rows=42,665 loops=1)

7. 216.008 225.884 ↑ 1.0 47,934 1

Bitmap Heap Scan on statuses_tags (cost=1,632.06..99,904.84 rows=48,968 width=8) (actual time=16.535..225.884 rows=47,934 loops=1)

  • Recheck Cond: (tag_id = 256)
  • Heap Blocks: exact=33522
8. 9.876 9.876 ↓ 1.0 51,057 1

Bitmap Index Scan on index_statuses_tags_on_tag_id_and_status_id (cost=0.00..1,619.82 rows=48,968 width=0) (actual time=9.876..9.876 rows=51,057 loops=1)

  • Index Cond: (tag_id = 256)
9. 766.944 766.944 ↑ 1.0 1 47,934

Index Scan using statuses_pkey on statuses (cost=0.44..7.79 rows=1 width=16) (actual time=0.016..0.016 rows=1 loops=47,934)

  • Index Cond: (id = statuses_tags.status_id)
  • Filter: ((reblog_of_id IS NULL) AND (deleted_at IS NULL) AND ((language IS NULL) OR ((language)::text = ANY ('{de,en}'::text[]))) AND (visibility = 0) AND (account_id <> ALL ('{42584,91596,28098,20248,35259,66731,55271,63877,61074,60914,41993,42307}'::bigint[])))
  • Rows Removed by Filter: 0
10. 469.315 469.315 ↑ 2.0 1 42,665

Index Only Scan using index_media_attachments_on_status_id on media_attachments (cost=0.43..6.93 rows=2 width=8) (actual time=0.010..0.011 rows=1 loops=42,665)

  • Index Cond: (status_id = statuses.id)
  • Heap Fetches: 48773
11. 223.104 223.104 ↑ 1.0 1 55,776

Index Scan using index_accounts_on_id on accounts (cost=0.42..6.76 rows=1 width=16) (actual time=0.004..0.004 rows=1 loops=55,776)

  • Index Cond: (id = statuses.account_id)
Planning time : 20.379 ms
Execution time : 1,768.694 ms