Commit ef996d89 authored by Alper Akgun's avatar Alper Akgun

Harden users_created usage data queries

Optimize usage data query with start and finish parameters
parent dd27e4a9
---
title: Harden users_created usage data queries
merge_request: 33956
author:
type: performance
......@@ -275,7 +275,7 @@ module EE
groups: distinct_count(::GroupMember.where(time_period), :user_id),
ldap_keys: distinct_count(::LDAPKey.where(time_period), :user_id),
ldap_users: distinct_count(::GroupMember.of_ldap_type.where(time_period), :user_id),
users_created: count(::User.where(time_period)),
users_created: count(::User.where(time_period), start: user_minimum_id, finish: user_maximum_id),
value_stream_management_customized_group_stages: count(::Analytics::CycleAnalytics::GroupStage.where(custom: true)),
projects_with_compliance_framework: count(::ComplianceManagement::ComplianceFramework::ProjectSettings),
ldap_servers: ldap_available_servers.size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment