Skip to content

Commit

Permalink
refactor: index performance (#909)
Browse files Browse the repository at this point in the history
  • Loading branch information
phamphong9981 authored Sep 24, 2024
1 parent 9e6012b commit 2a17c00
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions migrations/evm/20240924041138_index_performance.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Knex } from 'knex';

export async function up(knex: Knex): Promise<void> {
await knex.raw('set statement_timeout to 0');
await knex.raw(
'CREATE INDEX IF NOT EXISTS erc721_token_erc721_contract_address_id_index ON erc721_token(erc721_contract_address, id)'
);
await knex.raw(
'CREATE INDEX IF NOT EXISTS erc721_holder_statistic_erc721_contract_address_count_index ON erc721_holder_statistic(erc721_contract_address, count)'
);
}

export async function down(knex: Knex): Promise<void> {}

0 comments on commit 2a17c00

Please sign in to comment.