Skip to content

#740 index receipt fields for better query time #744

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

Merged
merged 3 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ $(XGO):
.PHONY: golangci-lint
golangci-lint: $(GOLANGCILINT)
$(info running linter...)
golangci-lint run --timeout=20m
golangci-lint run --timeout=20m -v

.PHONY: go-fmt
go-fmt:
Expand Down
18 changes: 18 additions & 0 deletions common/database/migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,24 @@ func (m *Migration) Init() error {
`
CREATE INDEX "main_block_id_idx" ON "main_block" ("id")
`,
`
CREATE INDEX "published_receipt_rmr_linked_idx" ON "published_receipt" ("rmr_linked")
`,
`
CREATE INDEX "merkle_tree_id_idx" ON "merkle_tree" ("id")
`,
`
CREATE INDEX "merkle_tree_block_height_idx" ON "merkle_tree" ("block_height")
`,
`
CREATE INDEX "node_receipt_rmr_idx" ON "node_receipt" ("rmr")
`,
`
CREATE INDEX "node_receipt_recipient_public_key_idx" ON "node_receipt" ("recipient_public_key")
`,
`
CREATE INDEX "node_receipt_reference_block_height_idx" ON "node_receipt" ("reference_block_height")
`,
}
return nil
}
Expand Down