From 94fc4e3c54f0d29acb6560ff8a9bccb33da18bfd Mon Sep 17 00:00:00 2001 From: Maxence Maireaux Date: Mon, 9 Jan 2023 16:40:43 +0100 Subject: [PATCH] feat: Upgrade sql index (#404) --- .../sqlstorage/migrates/17-optimized-segments/postgres.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/storage/sqlstorage/migrates/17-optimized-segments/postgres.sql b/pkg/storage/sqlstorage/migrates/17-optimized-segments/postgres.sql index 300545b42..7e6b1df4a 100644 --- a/pkg/storage/sqlstorage/migrates/17-optimized-segments/postgres.sql +++ b/pkg/storage/sqlstorage/migrates/17-optimized-segments/postgres.sql @@ -21,11 +21,11 @@ create table if not exists "VAR_LEDGER_NAME".postings ( ); --statement -create index postings_src on "VAR_LEDGER_NAME".postings using GIN(source); +create index if not exists postings_src on "VAR_LEDGER_NAME".postings using GIN(source); --statement -create index postings_dest on "VAR_LEDGER_NAME".postings using GIN(destination); +create index if not exists postings_dest on "VAR_LEDGER_NAME".postings using GIN(destination); --statement -create index postings_txid on "VAR_LEDGER_NAME".postings (txid asc); +create index if not exists postings_txid on "VAR_LEDGER_NAME".postings (txid asc); --statement insert into "VAR_LEDGER_NAME".postings(txid, posting_index, source, destination)