mirror of
https://github.com/MLBZ521/MacAdmin.git
synced 2026-02-03 14:03:26 +00:00
Query improvements
+ No reason for a LIKE comparison here + Removed table joins that were not utilized
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
-- Get Policies that Execute @ Ongoing
|
-- Get Policies that Execute @ Ongoing
|
||||||
SELECT policy_id
|
SELECT policy_id
|
||||||
FROM policies
|
FROM policies
|
||||||
WHERE execution_frequency LIKE "Ongoing";
|
WHERE execution_frequency = "Ongoing";
|
||||||
|
|
||||||
|
|
||||||
-- Policies with no Scope
|
-- Policies with no Scope
|
||||||
@@ -37,10 +37,6 @@ SELECT DISTINCT policies.policy_id, policies.name
|
|||||||
FROM policies
|
FROM policies
|
||||||
JOIN policy_deployment
|
JOIN policy_deployment
|
||||||
ON policy_deployment.policy_id = policies.policy_id
|
ON policy_deployment.policy_id = policies.policy_id
|
||||||
JOIN site_objects
|
|
||||||
ON site_objects.object_id = policies.policy_id
|
|
||||||
JOIN sites
|
|
||||||
ON sites.site_id = site_objects.site_id
|
|
||||||
WHERE
|
WHERE
|
||||||
policy_deployment.target_type = "106";
|
policy_deployment.target_type = "106";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user