Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix unique_short_code_plus_domain index in Microsoft SQL #2363

Merged
merged 3 commits into from
Feb 15, 2025

Conversation

acelaya
Copy link
Member

@acelaya acelaya commented Feb 15, 2025

Closes #2319

This PR is part of the investigation for #2319, and includes:

  1. A simplification of the query used when finding one short URL with fallback from domain to non-domain one. Basically the query run when a short URL is visited.
    Now this query does not try to join with the domains table if provided domain is already null.
  2. A fix for the unique_short_code_plus_domain index in Microsoft SQL, so that it also applies to rows where domain_id is null.

Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.79%. Comparing base (259635e) to head (053e1f3).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop    #2363   +/-   ##
==========================================
  Coverage      93.78%   93.79%           
- Complexity      1705     1706    +1     
==========================================
  Files            277      277           
  Lines           5904     5912    +8     
==========================================
+ Hits            5537     5545    +8     
  Misses           367      367           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@acelaya acelaya changed the title Simplify query to find short URL when domain is null Fix unique_short_code_plus_domain index in Microsoft SQL Feb 15, 2025
@acelaya acelaya marked this pull request as ready for review February 15, 2025 10:17
@acelaya acelaya merged commit 63d943d into shlinkio:develop Feb 15, 2025
23 checks passed
@acelaya acelaya deleted the feature/find-url-perf branch February 15, 2025 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Index for short_code + domain_id ignored when finding short URLs in (at least) MS SQL
1 participant