Skip to content

Commit

Permalink
Add useful user_notifications index
Browse files Browse the repository at this point in the history
  • Loading branch information
mqp committed Jan 7, 2024
1 parent fa958fd commit a96bcbe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions backend/supabase/user_notifications.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ create policy "public read" on user_notifications for
select
using (true);

create index if not exists user_notifications_notification_id on user_notifications (notification_id, user_id);

create index if not exists user_notifications_created_time on user_notifications (user_id, (to_jsonb(data) -> 'createdTime') desc);

create index if not exists user_notifications_unseen_text_created_time_idx on user_notifications (
Expand Down

0 comments on commit a96bcbe

Please sign in to comment.