Open charlesBochet opened 6 months ago
@magrinj @Weiko FYI
hello @charlesBochet ,as my first contribution to the project can this issue be assigned to me.
sure! Could you also make a benchmark before after? (you can use npx nx run twenty-server:command workspace:seed:demo
and add DEMO_WORKSPACE_IDS=171a8c8f-73ba-4edb-b2b2-1facb657f37e,171a8c8f-73ba-4edb-b2b2-1facb657f37f, ...
in your twenty-server .env
)
Scope & Context
We have noticed that the following indexes/foreign keys are missing: 1) metadata."workspaceCacheVersion"(workspaceId) should be converted to UUID 2) metadata."workspaceCacheVersion"(workspaceId) should have a foreign key to core.workspace(id) + onDelete Cascade 3) metadata."workspaceCacheVersion"(workspaceId) should be indexed 4) metadata."fieldMetadata" should have a composite index on (objectMetadata, workspaceId) 5) metadata."relationMetadata" should have two indexes on (toObjectMetadataId) + (fromObjectMetadataId)
Technical inputs