From 01cea6fe124bf3b78720e1d55887e9595ad49c98 Mon Sep 17 00:00:00 2001 From: "michele.artini" Date: Thu, 15 Jun 2023 14:10:39 +0200 Subject: [PATCH] postgres indexes --- .../src/main/resources/sql/community-schema.sql | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/dnet-exporter-api/src/main/resources/sql/community-schema.sql b/apps/dnet-exporter-api/src/main/resources/sql/community-schema.sql index a895f32d..4e742398 100644 --- a/apps/dnet-exporter-api/src/main/resources/sql/community-schema.sql +++ b/apps/dnet-exporter-api/src/main/resources/sql/community-schema.sql @@ -4,7 +4,6 @@ DROP TABLE IF EXISTS community_support_orgs; DROP TABLE IF EXISTS community_orgs; DROP TABLE IF EXISTS communities; - CREATE TABLE communities ( id text PRIMARY KEY, label text NOT NULL, @@ -55,3 +54,8 @@ CREATE TABLE community_orgs ( org_id text NOT NULL, PRIMARY KEY (community, org_id) ); + +CREATE INDEX community_projects_community ON community_projects(community); +CREATE INDEX community_datasources_community ON community_datasources(community); +CREATE INDEX community_support_orgs_community ON community_support_orgs(community); +CREATE INDEX community_orgs_community ON community_orgs(community);