explain.depesz.com

PostgreSQL's explain analyze made readable

Result: 1iiU

Settings
# exclusive inclusive rows x rows loops node
1. 19.698 369.283 ↓ 1.5 7,706 1

Hash Join (cost=16,758.16..58,945.97 rows=5,304 width=8) (actual time=83.307..369.283 rows=7,706 loops=1)

  • Hash Cond: (ud_perm.device_id = devices.id)
2. 277.406 290.401 ↓ 1.1 33,030 1

Bitmap Heap Scan on permissions_device ud_perm (cost=868.06..42,324.94 rows=31,436 width=4) (actual time=18.161..290.401 rows=33,030 loops=1)

  • Recheck Cond: (user_id = 100)
  • Heap Blocks: exact=24974
3. 12.995 12.995 ↓ 1.1 35,055 1

Bitmap Index Scan on ix_permissions_user_id (cost=0.00..860.20 rows=31,436 width=0) (actual time=12.995..12.995 rows=35,055 loops=1)

  • Index Cond: (user_id = 100)
4. 1.959 59.184 ↑ 10.4 7,706 1

Hash (cost=14,571.70..14,571.70 rows=80,352 width=4) (actual time=59.184..59.184 rows=7,706 loops=1)

  • Buckets: 131072 Batches: 2 Memory Usage: 1164kB
5. 57.225 57.225 ↑ 10.4 7,706 1

Index Scan using idx_devices_company_wh_status on devices (cost=0.42..14,571.70 rows=80,352 width=4) (actual time=0.029..57.225 rows=7,706 loops=1)

  • Index Cond: (company_id = 100)
  • Filter: (((category)::text = 'Meter'::text) AND ((status = 0) OR (status = '-1'::integer) OR (status = '-3'::integer) OR (status = '-4'::integer) OR (status <> ALL ('{0,-1,-3,-4}'::integer[]))))
  • Rows Removed by Filter: 4115
Planning time : 1.276 ms
Execution time : 370.129 ms