Added indexes to support frontpercent query changes
Note: need to determine conventions to use for index names and settings going forward. There are also some indexes in production that aren't in here and are probably good additions to a standard set.
This commit is contained in:
parent
845ec90c3e
commit
bc0213c9a1
@ -49,6 +49,10 @@ create table if not exists switches
|
|||||||
system serial not null references systems (id) on delete cascade,
|
system serial not null references systems (id) on delete cascade,
|
||||||
timestamp timestamp not null default (current_timestamp at time zone 'utc')
|
timestamp timestamp not null default (current_timestamp at time zone 'utc')
|
||||||
);
|
);
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_switches_system
|
||||||
|
ON switches USING btree (
|
||||||
|
system ASC NULLS LAST
|
||||||
|
) INCLUDE ("timestamp");
|
||||||
|
|
||||||
create table if not exists switch_members
|
create table if not exists switch_members
|
||||||
(
|
(
|
||||||
@ -56,6 +60,10 @@ create table if not exists switch_members
|
|||||||
switch serial not null references switches (id) on delete cascade,
|
switch serial not null references switches (id) on delete cascade,
|
||||||
member serial not null references members (id) on delete cascade
|
member serial not null references members (id) on delete cascade
|
||||||
);
|
);
|
||||||
|
CREATE INDEX IF NOT EXISTS idx_switch_members_switch
|
||||||
|
ON switch_members USING btree (
|
||||||
|
switch ASC NULLS LAST
|
||||||
|
) INCLUDE (member);
|
||||||
|
|
||||||
create table if not exists webhooks
|
create table if not exists webhooks
|
||||||
(
|
(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user