Geta / geta-notfoundhandler

The popular NotFound handler for ASP.NET Core and Optimizely, enabling better control over your 404 page in addition to allowing redirects for old URLs that no longer works.
Apache License 2.0
20 stars 16 forks source link

Missing index on [dbo].[NotFoundHandler.ContentUrlHistory] ContentKey #129

Closed quanmaiepi closed 1 month ago

quanmaiepi commented 3 months ago

As this is a frequently queried column, the lack of an index on this column is hurting performance. I'd go as far as suggesting adding a clustered index on this one.

quanmaiepi commented 3 months ago

Looking closely at the code, it seems the column is defined as NVARCHAR(2000) which makes it not indexable. hmm

quanmaiepi commented 2 months ago

One "reasonable" approach is to add a hashed value column and index on that. there might be caveat but that should work reasonably well