Skip to content

Indexer could use smaller hash indexes instead of btree indexes #890

Description

@urtho

Problem

All indexer indices are btree but not all have to be.

Solution

Replace btree indexes with hash indexes in places where only exact searches are used and the resulting hash index is significantly smaller.

One such example could be :

ledgerdb=# create index concurrently txn_by_tixid_hash on txn using hash (txid);
CREATE INDEX

ledgerdb=# \di+
                                         List of relations
 Schema |             Name              | Type  | Owner |       Table       |  Size   | Description
--------+-------------------------------+-------+-------+-------------------+---------+-------------
 public | txn_by_tixid                  | index | algo  | txn               | 43 GB   |
 public | txn_by_tixid_hash             | index | algo  | txn               | 16 GB   |

Urgency

Performance optimization.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions