Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

runtimes: add related transactions index by tx #320

Merged
merged 2 commits into from
Feb 17, 2023
Merged

Conversation

pro-wh
Copy link
Collaborator

@pro-wh pro-wh commented Feb 17, 2023

in #310, we want to look up related addresses by transaction. add an index so that we can quickly get those and pull the address preimages

also some indexes didn't get the runtime column added when we unified the runtime tables in #296. adding it

@pro-wh pro-wh merged commit c7ef29b into main Feb 17, 2023
@pro-wh pro-wh deleted the pro-wh/feature/related branch February 17, 2023 23:47
@@ -73,7 +73,7 @@ CREATE TABLE oasis_3.runtime_related_transactions
tx_index UINT31 NOT NULL,
FOREIGN KEY (runtime, tx_round, tx_index) REFERENCES oasis_3.runtime_transactions(runtime, round, tx_index) DEFERRABLE INITIALLY DEFERRED
);
CREATE INDEX ix_runtime_related_transactions_address_height_index ON oasis_3.runtime_related_transactions (account_address, tx_round, tx_index);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ohh, I didn't know that you could get transitive properties in indices.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants