explain.depesz.com

PostgreSQL's explain analyze made readable

Result: w7px

Settings
# exclusive inclusive rows x rows loops node
1. 0.012 0.711 ↓ 3.0 3 1

Nested Loop Semi Join (cost=15.67..33.97 rows=1 width=12,909) (actual time=0.403..0.711 rows=3 loops=1)

  • Join Filter: (m.mdm_channel__id = jt.mdm_channel_id)
  • Rows Removed by Join Filter: 6
2. 0.002 0.571 ↓ 2.0 4 1

Append (cost=11.37..26.33 rows=2 width=12,909) (actual time=0.292..0.571 rows=4 loops=1)

3. 0.039 0.390 ↓ 3.0 3 1

Nested Loop (cost=11.37..13.92 rows=1 width=12,909) (actual time=0.292..0.390 rows=3 loops=1)

  • Join Filter: (d.device__tenant_id = t.tenant__id)
4. 0.046 0.318 ↓ 3.0 3 1

Merge Join (cost=11.23..12.79 rows=1 width=13,223) (actual time=0.266..0.318 rows=3 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: 12
5. 0.042 0.042 ↑ 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.018..0.042 rows=10 loops=1)

6. 0.054 0.230 ↓ 5.5 11 1

Sort (cost=9.99..10.00 rows=2 width=11,063) (actual time=0.226..0.230 rows=11 loops=1)

  • Sort Key: d.device__tenant_id
  • Sort Method: quicksort Memory: 29kB
7. 0.015 0.176 ↓ 1.5 3 1

Merge Join (cost=1.33..9.98 rows=2 width=11,063) (actual time=0.151..0.176 rows=3 loops=1)

  • Merge Cond: (d.device__guid = m.mdm_channel__device_guid)
8. 0.011 0.061 ↑ 1.0 2 1

Nested Loop Left Join (cost=0.27..17.49 rows=2 width=9,739) (actual time=0.044..0.061 rows=2 loops=1)

9. 0.040 0.040 ↑ 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.028..0.040 rows=2 loops=1)

  • Filter: (device__dm_partition_id = 23000)
10. 0.010 0.010 ↓ 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.005..0.005 rows=0 loops=2)

  • Index Cond: ((d.device__p_serial_number)::text = (dep_device__serial_number)::text)
11. 0.077 0.100 ↓ 1.5 3 1

Sort (cost=1.07..1.07 rows=2 width=1,340) (actual time=0.099..0.100 rows=3 loops=1)

  • Sort Key: m.mdm_channel__device_guid
  • Sort Method: quicksort Memory: 25kB
12. 0.023 0.023 ↓ 1.5 3 1

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

  • Filter: (((mdm_channel__type)::text = 'DEVICE'::text) OR (((mdm_channel__type)::text = 'USER'::text) AND mdm_channel__is_enrolling_user))
  • Rows Removed by Filter: 1
13. 0.033 0.033 ↑ 1.0 1 3

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

  • Index Cond: (tenant__id = a.account__tenant_id)
14. 0.004 0.179 ↑ 1.0 1 1

Nested Loop Left Join (cost=1.47..12.39 rows=1 width=12,909) (actual time=0.137..0.179 rows=1 loops=1)

15. 0.004 0.165 ↑ 1.0 1 1

Nested Loop (cost=1.34..6.17 rows=1 width=13,255) (actual time=0.123..0.165 rows=1 loops=1)

  • Join Filter: (d_1.device__tenant_id = t_1.tenant__id)
16. 0.004 0.136 ↑ 1.0 1 1

Nested Loop (cost=1.20..5.09 rows=1 width=13,215) (actual time=0.094..0.136 rows=1 loops=1)

  • Join Filter: (m_1.mdm_channel__device_guid = d_1.device__guid)
17. 0.037 0.108 ↑ 1.0 1 1

Hash Join (cost=1.07..4.61 rows=1 width=3,500) (actual time=0.067..0.108 rows=1 loops=1)

  • Hash Cond: ((a_1.account__mdm_user_id)::text = (m_1.mdm_channel__mdm_user_id)::text)
18. 0.050 0.050 ↑ 1.0 35 1

Seq Scan on account a_1 (cost=0.00..3.35 rows=35 width=2,160) (actual time=0.008..0.050 rows=35 loops=1)

19. 0.009 0.021 ↑ 2.0 1 1

Hash (cost=1.05..1.05 rows=2 width=1,340) (actual time=0.021..0.021 rows=1 loops=1)

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
20. 0.012 0.012 ↑ 2.0 1 1

Seq Scan on mdm_channel m_1 (cost=0.00..1.05 rows=2 width=1,340) (actual time=0.010..0.012 rows=1 loops=1)

  • Filter: ((NOT mdm_channel__is_enrolling_user) AND ((mdm_channel__type)::text = 'USER'::text))
  • Rows Removed by Filter: 3
21. 0.024 0.024 ↑ 2.0 1 1

Index Scan using idx_device__tenant_id_p_serial_number on device d_1 (cost=0.13..0.45 rows=2 width=9,731) (actual time=0.024..0.024 rows=1 loops=1)

  • Index Cond: (device__tenant_id = a_1.account__tenant_id)
  • Filter: (device__dm_partition_id = 23000)
22. 0.025 0.025 ↑ 1.0 1 1

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

  • Index Cond: (tenant__id = a_1.account__tenant_id)
23. 0.010 0.010 ↓ 0.0 0 1

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

  • Index Cond: ((d_1.device__p_serial_number)::text = (dep_device__serial_number)::text)
24. 0.013 0.128 ↓ 2.0 2 4

Materialize (cost=4.30..7.61 rows=1 width=16) (actual time=0.026..0.032 rows=2 loops=4)

25. 0.034 0.115 ↓ 3.0 3 1

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

  • Hash Cond: (jt.windows_app_list_id = al.windows_app_list__id)
26. 0.024 0.024 ↑ 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.024 rows=24 loops=1)

27. 0.009 0.057 ↑ 1.0 1 1

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

  • Buckets: 1024 Batches: 1 Memory Usage: 9kB
28. 0.048 0.048 ↑ 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.046..0.048 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))
Planning time : 10.791 ms
Execution time : 2.436 ms