explain.depesz.com

PostgreSQL's explain analyze made readable

Result: ees

Settings
# exclusive inclusive rows x rows loops node
1. 0.070 0.847 ↑ 2.5 130 1

Sort (cost=3,382.94..3,383.76 rows=330 width=49) (actual time=0.840..0.847 rows=130 loops=1)

  • Sort Key: t0.device_state DESC, t1.last_updated_time DESC
  • Sort Method: quicksort Memory: 43kB
2. 0.103 0.777 ↑ 2.5 130 1

Nested Loop (cost=18.75..3,369.13 rows=330 width=49) (actual time=0.064..0.777 rows=130 loops=1)

3. 0.121 0.154 ↑ 2.5 65 1

Bitmap Heap Scan on device_nbr t1 (cost=10.18..635.63 rows=165 width=45) (actual time=0.045..0.154 rows=65 loops=1)

  • Recheck Cond: ((device_info_id = 6) OR (nbr_device_info_id = 2))
  • Filter: (((NOT soft_delete) OR (soft_delete IS NULL)) AND ((customer_id = 2) OR (customer_id = '-1'::integer)))
  • Heap Blocks: exact=51
4. 0.000 0.033 ↓ 0.0 0 1

BitmapOr (cost=10.18..10.18 rows=165 width=0) (actual time=0.033..0.033 rows=0 loops=1)

5. 0.026 0.026 ↑ 1.1 65 1

Bitmap Index Scan on device_nbr_nbr_device_info_id_device_info_id_idx (cost=0.00..4.98 rows=74 width=0) (actual time=0.026..0.026 rows=65 loops=1)

  • Index Cond: (device_info_id = 6)
6. 0.007 0.007 ↓ 0.0 0 1

Bitmap Index Scan on device_nbr_nbr_device_info_id_idx (cost=0.00..5.11 rows=91 width=0) (actual time=0.007..0.007 rows=0 loops=1)

  • Index Cond: (nbr_device_info_id = 2)
7. 0.195 0.520 ↑ 1.0 2 65

Bitmap Heap Scan on device_info t0 (cost=8.57..16.55 rows=2 width=8) (actual time=0.007..0.008 rows=2 loops=65)

  • Recheck Cond: ((id = t1.device_info_id) OR (id = t1.nbr_device_info_id))
  • Filter: (((NOT soft_delete) OR (soft_delete IS NULL)) AND (id <> 388970) AND ((customer_id = 2) OR (customer_id = '-1'::integer)))
  • Heap Blocks: exact=130
8. 0.000 0.325 ↓ 0.0 0 65

BitmapOr (cost=8.57..8.57 rows=2 width=0) (actual time=0.005..0.005 rows=0 loops=65)

9. 0.065 0.065 ↑ 1.0 1 65

Bitmap Index Scan on device_info_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.001..0.001 rows=1 loops=65)

  • Index Cond: (id = t1.device_info_id)
10. 0.260 0.260 ↑ 1.0 1 65

Bitmap Index Scan on device_info_id_index (cost=0.00..4.28 rows=1 width=0) (actual time=0.004..0.004 rows=1 loops=65)

  • Index Cond: (id = t1.nbr_device_info_id)
Planning time : 0.386 ms
Execution time : 0.910 ms