The "SC_TICKET" records corresponding to expired sessions are automatically deleted by Sitecore.Tasks.CleanupAuthenticationTicketsAgent from the Properties table of a database. However, if the agent fails to clean them up, the expired records remain in the Properties table. Large numbers of "SC_TICKET" records can lead to performance degradation of the login process.
To resolve the issue, download and install the patch compatible with the affected product version found on this page:
https://github.com/SitecoreSupport/Sitecore.Support.223702/releases.
Note, for Sitecore XP 9.0.0, to clean up the Properties table of a database after installing the patch as follows:
<PropertyStoreProvider role:require="ContentManagement or ContentDelivery">By default, it is the Web database for scaled instance, and the Core database for a Standalone instance.
<patch:attribute name="defaultStore">web</patch:attribute>
</PropertyStoreProvider>
USE {your_database_name};
DELETE FROM [dbo].[Properties]
WHERE [dbo].[Properties].[Key] like '%SC_TICKET%'