Skip to content

Commit

Permalink
updated index
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Feb 3, 2025
1 parent c22d964 commit 9e5d47e
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
CREATE INDEX blocks_height_null_cumulative_finalization_time ON blocks (height)
WHERE blocks.cumulative_finalization_time IS NULL
AND blocks.finalization_time IS NOT NULL;
-- blocks_hash_gin_trgm_idx index does not suppport char
ALTER TABLE blocks ALTER COLUMN hash SET DATA TYPE VARCHAR(64);
-- Used to efficiently perform partial string matching on the `hash` column,
-- allowing fast lookups when searching for blocks by their hash prefix using `LIKE`.
CREATE INDEX blocks_hash_gin_trgm_idx ON blocks USING gin(hash gin_trgm_ops);
Expand Down

0 comments on commit 9e5d47e

Please sign in to comment.