Skip to content

Commit

Permalink
fix(sqlserver): 优化密码过期生成随机密码中N+1查询的问题 TencentBlueKing#7643
Browse files Browse the repository at this point in the history
  • Loading branch information
WytheLi authored and zhangzhw8 committed Oct 30, 2024
1 parent 0ecd8a1 commit 55e79b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dbm-ui/backend/configuration/tasks/password.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def get_all_sqlserver_clusters():
获取sqlserver所有集群的实例信息
"""
cluster_infos = []
clusters = Cluster.objects.filter(
clusters = Cluster.objects.prefetch_related("storageinstance_set", "storageinstance_set__machine").filter(
cluster_type__in=[ClusterType.SqlserverHA.value, ClusterType.SqlserverSingle.value]
)
for cluster in clusters:
Expand Down

0 comments on commit 55e79b8

Please sign in to comment.