Skip to content

v2.0.0

Compare
Choose a tag to compare
@RiccardoM RiccardoM released this 02 Feb 13:48
· 20 commits to main since this release

With this version of Athena, we are introducing a new PostgreSQL table named profile_counters that will be used to
store the number of relationships, blocks, chain links and application links associated to a user. This is done to
improve the performance of queries that need to count the number of these objects without having to scan the entire
database.

Please note that this change requires a new database table to be created. To do so, you can use the following SQL
statement:

CREATE TABLE profile_counters
(
    row_id                  SERIAL NOT NULL PRIMARY KEY,

    profile_address         TEXT   NOT NULL,
    relationships_count     BIGINT NOT NULL DEFAULT 0,
    blocks_count            BIGINT NOT NULL DEFAULT 0,
    chain_links_count       BIGINT NOT NULL DEFAULT 0,
    application_links_count BIGINT NOT NULL DEFAULT 0,
    CONSTRAINT unique_profile_counters UNIQUE (profile_address)
);

If you also want to track such table inside Hasura, you can run the following commands to import the updated Hasura
metadata into your endpoint: