chocolatey / chocolatey-licensed-issues

Issues for Licensed Editions of Chocolatey
19 stars 13 forks source link

Central Management - Database Performance Enhancement #305

Open steviecoaster opened 2 years ago

steviecoaster commented 2 years ago

Description

The following query is causing alerts to occur with Azure SQL instances for folks running the Marketplace image:

(@__ef_filter__p_0 bit,@__dje_z7EKFB5M54YBWCELSDJF4F_ejd_0 datetime2(7))SELECT COUNT_BIG(*)

FROM [AbpAuditLogs] AS [a]

WHERE ((@__ef_filter__p_0 = CAST(1 AS bit)) OR [a].[TenantId] IS NULL) AND ([a].[ExecutionTime] < @__dje_z7EKFB5M54YBWCELSDJF4F_ejd_0)

The suggestion from the Azure portal is to add some indexes

Why Is It Needed

We should aim to be as performant as possible, and these indexes will increase performance and reduce warnings when using CCM with Azure SQL instances.

Related Issues and Tickets

Zendesk Ticket Internal Issue

Acceptance Tests

Done Checklist

┆Issue is synchronized with this Gitlab issue by Unito

Windos commented 2 years ago

Just to note: Any optimizations to the database helps all users of CCM, not just those in Azure.