Base solution for your next web application
Open Closed

AbpUserTokens index recommendation #12580


User avatar
0
ricardo created

Hello,

We are receiving a recommendation in Azure to create the following index on the AbpUserTokens table:

CREATE NONCLUSTERED INDEX [nci_msft_1_AbpUserTokens_CE50B37340DC5FC969A275B8D2338104] ON [dbo].[AbpUserTokens] ([ExpireDate]) INCLUDE ([LoginProvider], [Name], [TenantId], [UserId], [Value]) WITH (ONLINE = ON)

Do you think this is a valid option?

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @ricardo

    Yes, this recommendation makes sense in an ASP.NET Zero application. The AbpUserTokens table is queried frequently by token provider + user + tenant + name, and filtering by ExpireDate is also common. Adding a non-clustered index with the suggested included columns can reduce lookup cost and improve token-related queries.

    There is no conflict with ASP.NET Zero’s architecture it is safe to create this index, and it will not affect the framework features.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    ricardo created

    Thank you very much.

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)