explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 6Zyk

Settings
# exclusive inclusive rows x rows loops node
1. 0.028 2.976 ↓ 6.0 18 1

Sort (cost=1,107.62..1,107.63 rows=3 width=70) (actual time=2.972..2.976 rows=18 loops=1)

  • Sort Key: notes.created_at DESC
  • Sort Method: quicksort Memory: 30kB
2. 0.075 2.948 ↓ 6.0 18 1

Nested Loop (cost=28.44..1,107.60 rows=3 width=70) (actual time=0.345..2.948 rows=18 loops=1)

3. 1.133 1.305 ↓ 1.1 196 1

Bitmap Heap Scan on notes_companies (cost=28.01..332.15 rows=179 width=8) (actual time=0.191..1.305 rows=196 loops=1)

  • Recheck Cond: (company_id = ANY ('{1514161,1514251,1514292,1514313,1528521,1574313,1609744,1610921,1687144,52676883,121081558}'::integer[]))
  • Heap Blocks: exact=150
4. 0.172 0.172 ↓ 1.1 196 1

Bitmap Index Scan on notes_companies_company_id_index (cost=0.00..27.97 rows=179 width=0) (actual time=0.172..0.172 rows=196 loops=1)

  • Index Cond: (company_id = ANY ('{1514161,1514251,1514292,1514313,1528521,1574313,1609744,1610921,1687144,52676883,121081558}'::integer[]))
5. 1.568 1.568 ↓ 0.0 0 196

Index Scan using notes_pkey on notes (cost=0.42..4.32 rows=1 width=66) (actual time=0.008..0.008 rows=0 loops=196)

  • Index Cond: (id = notes_companies.note_id)
  • Filter: (organization_id = 7)
  • Rows Removed by Filter: 1