diff options
| author | Claude <noreply@anthropic.com> | 2026-01-12 08:46:55 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-01-12 08:46:55 +0000 |
| commit | 485486c7ff986712ecb09e92217236d276d317c4 (patch) | |
| tree | 8c8c49747fd4d9db6cc24c821a2e27aced01a271 /backend/db/migrations | |
| parent | 67bfaf8f103295c5562db02a0044e311e3504518 (diff) | |
| download | feedaka-485486c7ff986712ecb09e92217236d276d317c4.tar.gz feedaka-485486c7ff986712ecb09e92217236d276d317c4.tar.zst feedaka-485486c7ff986712ecb09e92217236d276d317c4.zip | |
feat: deduplicate feed items by guid
Use ROW_NUMBER() window function to filter out duplicate articles
with the same guid across different feeds. This ensures each guid
appears only once in unread/read article lists.
- Add idx_articles_guid index for PARTITION BY performance
- Modify GetUnreadArticles and GetReadArticles queries with CTE
Diffstat (limited to 'backend/db/migrations')
| -rw-r--r-- | backend/db/migrations/005_add_guid_index.sql | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/backend/db/migrations/005_add_guid_index.sql b/backend/db/migrations/005_add_guid_index.sql new file mode 100644 index 0000000..a653d79 --- /dev/null +++ b/backend/db/migrations/005_add_guid_index.sql @@ -0,0 +1,2 @@ +-- Add index on guid for deduplication queries +CREATE INDEX IF NOT EXISTS idx_articles_guid ON articles(guid); |
