From 7973304e76bae8d500dc72a872b3bd602906f73d Mon Sep 17 00:00:00 2001 From: shrugs Date: Tue, 10 Mar 2026 12:02:38 -0500 Subject: [PATCH] feat: add missing index on domain name column the subgraph_domains table had no index on the `name` column, causing queries filtering by domain name to do full table scans. Co-Authored-By: Claude Opus 4.6 --- packages/ensnode-schema/src/schemas/subgraph.schema.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/ensnode-schema/src/schemas/subgraph.schema.ts b/packages/ensnode-schema/src/schemas/subgraph.schema.ts index 03a1e37011..a87e58e4ca 100644 --- a/packages/ensnode-schema/src/schemas/subgraph.schema.ts +++ b/packages/ensnode-schema/src/schemas/subgraph.schema.ts @@ -93,6 +93,7 @@ export const subgraph_domain = onchainTable( expiryDate: t.bigint(), }), (t) => ({ + byName: index().on(t.name), byLabelhash: index().on(t.labelhash), byParentId: index().on(t.parentId), byOwnerId: index().on(t.ownerId),