Skip to content

Commit

Permalink
services/horizon: Add a brin index on history_trades_60000(timestamp) (
Browse files Browse the repository at this point in the history
…#3947)

* Add a brin index on history_trades_60000(timestamp)

* Update changelog
  • Loading branch information
Paul Bellamy authored and bartekn committed Sep 22, 2021
1 parent 633f388 commit 337f2ac
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
4 changes: 4 additions & 0 deletions services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this
file. This project adheres to [Semantic Versioning](http://semver.org/).

## Unreleased

* Add an index on trade aggregations, to improve ingestion performance ([3947](https://github.com/stellar/go/pull/3947)).

## v2.8.2
**Upgrading to this version from <= v2.8.0 will trigger a state rebuild. During this process (which will take at least 10 minutes), Horizon will not ingest new ledgers.**

Expand Down
23 changes: 23 additions & 0 deletions services/horizon/internal/db2/schema/bindata.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- +migrate Up notransaction

CREATE INDEX CONCURRENTLY IF NOT EXISTS htrd_agg_timestamp_brin ON history_trades_60000 USING brin(timestamp);

-- +migrate Down

DROP INDEX IF EXISTS htrd_agg_timestamp_brin;

0 comments on commit 337f2ac

Please sign in to comment.