explain.depesz.com

PostgreSQL's explain analyze made readable

Result: eDSu

Settings
# exclusive inclusive rows x rows loops node
1. 0.161 2.746 ↓ 9.1 100 1

Sort (cost=93.35..93.38 rows=11 width=818) (actual time=2.742..2.746 rows=100 loops=1)

  • Sort Key: afi.pinned DESC, afi.remotecreatedtime DESC
  • Sort Method: quicksort Memory: 126kB
  • Buffers: shared hit=1408
2.          

CTE amplify_items_in_feed

3. 0.155 0.271 ↓ 100.0 100 1

Sort (cost=67.95..67.96 rows=1 width=85) (actual time=0.240..0.271 rows=100 loops=1)

  • Sort Key: afi_1.pinned DESC, afi_1.remotecreatedtime DESC
  • Sort Method: quicksort Memory: 32kB
  • Buffers: shared hit=8
4. 0.013 0.116 ↓ 100.0 100 1

Nested Loop (cost=6.62..67.94 rows=1 width=85) (actual time=0.076..0.116 rows=100 loops=1)

  • Buffers: shared hit=8
5. 0.027 0.027 ↑ 1.0 1 1

Index Only Scan using ix_amplifyfeedsources_amplifyfeeds_isdeleted on amplifyfeedsources afs (cost=0.28..8.30 rows=1 width=4) (actual time=0.027..0.027 rows=1 loops=1)

  • Index Cond: ((amplifyfeedid = 28) AND (isdeleted = false))
  • Filter: (NOT isdeleted)
  • Heap Fetches: 1
  • Buffers: shared hit=3
6. 0.065 0.076 ↓ 5.3 100 1

Bitmap Heap Scan on amplifyfeeditems afi_1 (cost=6.34..59.45 rows=19 width=89) (actual time=0.041..0.076 rows=100 loops=1)

  • Recheck Cond: (amplifyfeedsourceid = afs.id)
  • Filter: ((NOT isdeleted) AND (status = 1))
  • Heap Blocks: exact=2
  • Buffers: shared hit=5
7. 0.011 0.011 ↑ 2.7 101 1

Bitmap Index Scan on fk_amplifyfeeditems_amplifyfeedsources (cost=0.00..6.34 rows=274 width=0) (actual time=0.011..0.011 rows=101 loops=1)

  • Index Cond: (amplifyfeedsourceid = afs.id)
  • Buffers: shared hit=3
8. 0.783 2.585 ↓ 9.1 100 1

Nested Loop Left Join (cost=5.66..25.21 rows=11 width=818) (actual time=0.320..2.585 rows=100 loops=1)

  • Buffers: shared hit=1408
9. 0.095 1.602 ↓ 100.0 100 1

Nested Loop Left Join (cost=1.42..10.02 rows=1 width=1,435) (actual time=0.307..1.602 rows=100 loops=1)

  • Buffers: shared hit=1308
10. 0.151 1.407 ↓ 100.0 100 1

Nested Loop Left Join (cost=1.14..9.66 rows=1 width=1,292) (actual time=0.285..1.407 rows=100 loops=1)

  • Buffers: shared hit=1108
11. 0.043 1.156 ↓ 100.0 100 1

Nested Loop Left Join (cost=0.86..9.35 rows=1 width=810) (actual time=0.279..1.156 rows=100 loops=1)

  • Buffers: shared hit=808
12. 0.073 1.013 ↓ 100.0 100 1

Nested Loop Left Join (cost=0.71..9.18 rows=1 width=778) (actual time=0.260..1.013 rows=100 loops=1)

  • Buffers: shared hit=708
13. 0.059 0.840 ↓ 100.0 100 1

Nested Loop (cost=0.57..9.00 rows=1 width=648) (actual time=0.256..0.840 rows=100 loops=1)

  • Buffers: shared hit=608
14. 0.071 0.581 ↓ 100.0 100 1

Nested Loop (cost=0.28..8.32 rows=1 width=89) (actual time=0.251..0.581 rows=100 loops=1)

  • Buffers: shared hit=308
15. 0.310 0.310 ↓ 100.0 100 1

CTE Scan on amplify_items_in_feed afi (cost=0.00..0.02 rows=1 width=85) (actual time=0.243..0.310 rows=100 loops=1)

  • Buffers: shared hit=8
16. 0.200 0.200 ↑ 1.0 1 100

Index Scan using accountitems_pkey on accountitems ai (cost=0.28..8.30 rows=1 width=8) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (id = afi.accountitemid)
  • Buffers: shared hit=300
17. 0.200 0.200 ↑ 1.0 1 100

Index Scan using items_pkey on items i (cost=0.29..0.68 rows=1 width=563) (actual time=0.002..0.002 rows=1 loops=100)

  • Index Cond: (id = ai.itemid)
  • Buffers: shared hit=300
18. 0.100 0.100 ↓ 0.0 0 100

Index Scan using facebookmetadatas_pkey on facebookmetadatas fm (cost=0.15..0.18 rows=1 width=134) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (itemid = i.id)
  • Buffers: shared hit=100
19. 0.100 0.100 ↓ 0.0 0 100

Index Scan using twittermetadatas_pkey on twittermetadatas tm (cost=0.14..0.17 rows=1 width=36) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (itemid = i.id)
  • Buffers: shared hit=100
20. 0.100 0.100 ↑ 1.0 1 100

Index Scan using instagrammetadatas_pkey on instagrammetadatas im (cost=0.28..0.31 rows=1 width=486) (actual time=0.001..0.001 rows=1 loops=100)

  • Index Cond: (itemid = i.id)
  • Buffers: shared hit=300
21. 0.100 0.100 ↓ 0.0 0 100

Index Scan using articlemetadatas_pkey on articlemetadatas am (cost=0.28..0.36 rows=1 width=147) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (itemid = i.id)
  • Buffers: shared hit=200
22. 0.100 0.200 ↓ 0.0 0 100

Bitmap Heap Scan on accountitemtags ait (cost=4.24..14.91 rows=11 width=4) (actual time=0.002..0.002 rows=0 loops=100)

  • Recheck Cond: (accountitemid = afi.accountitemid)
  • Buffers: shared hit=100
23. 0.100 0.100 ↓ 0.0 0 100

Bitmap Index Scan on ix_accountitemtags_accountitemid (cost=0.00..4.24 rows=11 width=0) (actual time=0.001..0.001 rows=0 loops=100)

  • Index Cond: (accountitemid = afi.accountitemid)
  • Buffers: shared hit=100
Planning time : 3.400 ms
Execution time : 3.093 ms