explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 8mgT

Settings

Optimization(s) for this plan:

# exclusive inclusive rows x rows loops node
1. 0.004 17.555 ↑ 1.0 3 1

Limit (cost=36.03..36.04 rows=3 width=38) (actual time=17.553..17.555 rows=3 loops=1)

  • Buffers: shared hit=26 read=9
2. 0.068 17.551 ↑ 1.0 5 1

Sort (cost=36.03..36.04 rows=5 width=38) (actual time=17.550..17.551 rows=5 loops=1)

  • Sort Key: device.phone_number DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=26 read=9
3. 0.020 17.483 ↑ 1.0 5 1

Nested Loop (cost=9.71..35.97 rows=5 width=38) (actual time=17.364..17.483 rows=5 loops=1)

  • Buffers: shared hit=23 read=9
4. 0.087 17.363 ↑ 1.0 5 1

Bitmap Heap Scan on device_device device (cost=9.44..18.41 rows=5 width=38) (actual time=17.297..17.363 rows=5 loops=1)

  • Recheck Cond: (sid = ANY ('{2846,2845,2192,2191,1345}'::integer[]))
  • Heap Blocks: exact=4
  • Buffers: shared hit=9 read=8
5. 17.276 17.276 ↑ 1.0 5 1

Bitmap Index Scan on pk_device_device (cost=0.00..9.44 rows=5 width=0) (actual time=17.276..17.276 rows=5 loops=1)

  • Index Cond: (sid = ANY ('{2846,2845,2192,2191,1345}'::integer[]))
  • Buffers: shared hit=9 read=4
6. 0.100 0.100 ↑ 1.0 1 5

Index Only Scan using pk_common_entities_organization on common_entities_organization organization (cost=0.27..3.51 rows=1 width=8) (actual time=0.020..0.020 rows=1 loops=5)

  • Index Cond: (sid = device.organization_sid)
  • Heap Fetches: 4
  • Buffers: shared hit=14 read=1
Planning time : 1.960 ms
Execution time : 17.696 ms