Skip to content

Commit

Permalink
improve query and indexes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikemountain committed Dec 15, 2023
1 parent 65b7440 commit 344a10a
Show file tree
Hide file tree
Showing 3 changed files with 200 additions and 154 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
-- Copyright (c) HashiCorp, Inc.
-- SPDX-License-Identifier: BUSL-1.1

begin;

-- Add new indexes for the create and update time queries.
create index session_create_time_list_idx
on session (create_time desc,
public_id,
project_id,
user_id,
termination_reason);
create index session_update_time_list_idx
on session (update_time desc,
public_id,
project_id,
user_id,
termination_reason);

commit;
Loading

0 comments on commit 344a10a

Please sign in to comment.