Skip to content

Commit

Permalink
feat: add some index allowing to quicky retrieve transactions and acc…
Browse files Browse the repository at this point in the history
…ounts sequences using their natural identifiers
  • Loading branch information
gfyrag committed Oct 18, 2024
1 parent 07bc0d3 commit 5b63f49
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions internal/storage/bucket/migrations/11-make-stateless.sql
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ alter column id type bigint;

drop index transactions_reference;
create unique index transactions_reference on transactions (ledger, reference);
create index transactions_sequences on transactions (id, seq);

alter table logs
add column memento bytea,
Expand All @@ -206,6 +207,8 @@ create table accounts_volumes (
primary key (ledger, accounts_address, asset)
);

create index accounts_sequences on accounts (address, seq);

alter table transactions_metadata
add column transactions_id bigint;

Expand Down

0 comments on commit 5b63f49

Please sign in to comment.