explain.depesz.com

PostgreSQL's explain analyze made readable

Result: xDv

Settings
# exclusive inclusive rows x rows loops node
1. 0.009 0.652 ↓ 2.0 2 1

Nested Loop (cost=19.48..21.99 rows=1 width=12,909) (actual time=0.569..0.652 rows=2 loops=1)

  • Join Filter: (d.device__guid = mc.mdm_channel__device_guid)
  • Rows Removed by Join Filter: 1
2. 0.001 0.415 ↓ 2.0 2 1

Append (cost=11.36..13.84 rows=1 width=12,909) (actual time=0.342..0.415 rows=2 loops=1)

3. 0.026 0.414 ↓ 2.0 2 1

Nested Loop (cost=11.36..13.83 rows=1 width=12,909) (actual time=0.341..0.414 rows=2 loops=1)

  • Join Filter: (d.device__tenant_id = t.tenant__id)
4. 0.039 0.356 ↓ 2.0 2 1

Merge Join (cost=11.23..12.70 rows=1 width=13,223) (actual time=0.307..0.356 rows=2 loops=1)

  • Merge Cond: (a.account__tenant_id = d.device__tenant_id)
  • Join Filter: (d.device__owner_id = a.account__id)
  • Rows Removed by Join Filter: 8
5. 0.069 0.069 ↑ 3.5 10 1

Index Scan using idx_account_tenant_id on account a (cost=0.14..9.71 rows=35 width=2,160) (actual time=0.033..0.069 rows=10 loops=1)

6. 0.017 0.248 ↓ 6.0 6 1

Materialize (cost=9.98..9.99 rows=1 width=11,063) (actual time=0.245..0.248 rows=6 loops=1)

7. 0.106 0.231 ↓ 2.0 2 1

Sort (cost=9.98..9.99 rows=1 width=11,063) (actual time=0.231..0.231 rows=2 loops=1)

  • Sort Key: d.device__tenant_id
  • Sort Method: quicksort Memory: 28kB
8. 0.012 0.125 ↓ 2.0 2 1

Merge Join (cost=1.35..9.97 rows=1 width=11,063) (actual time=0.106..0.125 rows=2 loops=1)

  • Merge Cond: (d.device__guid = m.mdm_channel__device_guid)
9. 0.010 0.042 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.27..17.48 rows=2 width=9,739) (actual time=0.029..0.042 rows=2 loops=1)

10. 0.020 0.020 ↑ 1.0 2 1

Index Scan using uc_device__guid on device d (cost=0.13..8.16 rows=2 width=9,731) (actual time=0.011..0.020 rows=2 loops=1)

11. 0.012 0.012 ↓ 0.0 0 2

Index Scan using dep_device_dep_device__serial_number_key on dep_device dp (cost=0.14..3.16 rows=1 width=40) (actual time=0.006..0.006 rows=0 loops=2)

  • Index Cond: ((d.device__p_serial_number)::text = (dep_device__serial_number)::text)
12. 0.049 0.071 ↓ 2.0 2 1

Sort (cost=1.08..1.08 rows=1 width=1,340) (actual time=0.070..0.071 rows=2 loops=1)

  • Sort Key: m.mdm_channel__device_guid
  • Sort Method: quicksort Memory: 25kB
13. 0.022 0.022 ↓ 2.0 2 1

Seq Scan on mdm_channel m (cost=0.00..1.07 rows=1 width=1,340) (actual time=0.017..0.022 rows=2 loops=1)

  • Filter: (((mdm_channel__type)::text = 'DEVICE'::text) AND (((mdm_channel__type)::text = 'DEVICE'::text) OR (((mdm_channel__type)::text = 'USER'::text) AND mdm_channel__is_enrolling_user)))
  • Rows Removed by Filter: 2
14. 0.032 0.032 ↑ 1.0 1 2

Index Scan using pk_tenant on tenant t (cost=0.14..1.07 rows=1 width=48) (actual time=0.016..0.016 rows=1 loops=2)

  • Index Cond: (tenant__id = a.account__tenant_id)
15. 0.006 0.228 ↓ 2.0 2 2

Unique (cost=8.12..8.13 rows=1 width=16) (actual time=0.112..0.114 rows=2 loops=2)

16. 0.027 0.222 ↓ 2.0 2 2

Sort (cost=8.12..8.12 rows=1 width=16) (actual time=0.111..0.111 rows=2 loops=2)

  • Sort Key: mc.mdm_channel__device_guid
  • Sort Method: quicksort Memory: 25kB
17. 0.004 0.195 ↓ 3.0 3 1

Nested Loop (cost=4.43..8.11 rows=1 width=16) (actual time=0.150..0.195 rows=3 loops=1)

18. 0.066 0.164 ↓ 3.0 3 1

Hash Join (cost=4.30..7.61 rows=1 width=16) (actual time=0.130..0.164 rows=3 loops=1)

  • Hash Cond: (jt.windows_app_list_id = al.windows_app_list__id)
19. 0.038 0.038 ↑ 1.0 24 1

Seq Scan on jt_mdm_channel_to_windows_app_list jt (cost=0.00..3.24 rows=24 width=24) (actual time=0.008..0.038 rows=24 loops=1)

20. 0.016 0.060 ↑ 1.0 1 1

Hash (cost=4.29..4.29 rows=1 width=8) (actual time=0.060..0.060 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
21. 0.044 0.044 ↑ 1.0 1 1

Index Scan using uc_windows_app_list_identifier_version on windows_app_list al (cost=0.27..4.29 rows=1 width=8) (actual time=0.042..0.044 rows=1 loops=1)

  • Index Cond: (((windows_app_list__identifier)::text = 'MobileIron.AppsAtWork_ekps40mpcpkay'::text) AND ((windows_app_list__version)::text = '9.6.0.249'::text))
22. 0.027 0.027 ↑ 1.0 1 3

Index Scan using pk_mdm_channel on mdm_channel mc (cost=0.13..0.40 rows=1 width=32) (actual time=0.009..0.009 rows=1 loops=3)

  • Index Cond: (mdm_channel__id = jt.mdm_channel_id)