[PR #157] [MERGED] [core] Add Indexes to Improve Query Performance #157

Closed
opened 2025-10-31 16:58:27 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/feeddeck/feeddeck/pull/157
Author: @ricoberger
Created: 3/13/2024
Status: Merged
Merged: 3/13/2024
Merged by: @ricoberger

Base: mainHead: core-add-indexes-to-improve-query-performance


📝 Commits (1)

  • 3d92ba5 [core] Add Indexes to Improve Query Performance

📊 Changes

1 file changed (+18 additions, -0 deletions)

View changed files

supabase/migrations/20240312204702_add_indexes.sql (+18 -0)

📄 Description

Until now it could happen that the items for a column could not be retrieved from the database, because of the set query timeout. In this case we received the following error:

PostgrestException(message: canceling statement due to statement timeout, code: 57014, details: Internal Server Error, hint: null)

To fix this issue we added an items_columnId_idx index, so that the items for a column are retrieved fast.

We also added some other useful indexes to improve the overall performance of our queries.

Last but not least we also added an index to the userId columns as it is recommended by Supabase to improve the performance of our RLS policies.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/feeddeck/feeddeck/pull/157 **Author:** [@ricoberger](https://github.com/ricoberger) **Created:** 3/13/2024 **Status:** ✅ Merged **Merged:** 3/13/2024 **Merged by:** [@ricoberger](https://github.com/ricoberger) **Base:** `main` ← **Head:** `core-add-indexes-to-improve-query-performance` --- ### 📝 Commits (1) - [`3d92ba5`](https://github.com/feeddeck/feeddeck/commit/3d92ba579b6e9acd5585c2938d711ee29b1831cc) [core] Add Indexes to Improve Query Performance ### 📊 Changes **1 file changed** (+18 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `supabase/migrations/20240312204702_add_indexes.sql` (+18 -0) </details> ### 📄 Description Until now it could happen that the items for a column could not be retrieved from the database, because of the set query timeout. In this case we received the following error: ``` PostgrestException(message: canceling statement due to statement timeout, code: 57014, details: Internal Server Error, hint: null) ``` To fix this issue we added an `items_columnId_idx` index, so that the items for a column are retrieved fast. We also added some other useful indexes to improve the overall performance of our queries. Last but not least we also added an index to the `userId` columns as it is recommended by Supabase to improve the performance of our RLS policies. <!-- Keep PR title verbose enough and add prefix telling about what source it touches e.g "[rss] Add feature xyz" or if the the PR is not realated to a source use "[core]", e.g. "[core] Fix xyz". If you add a breaking change within your PR you should add ":warning:" to the title, e.g. ":warning: [core] My breaking change" --> <!-- Description of what have been changed. Please also reference an issue, when available. --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-10-31 16:58:27 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/feeddeck#157