perf: add composite index on user_workspace(workspace_id, role) #11
Labels
No labels
P1
P2
P3
PHP
agent-ready
bug
clotho
discovery
docs
epic
refactor
review
security
testing
athena
athena-gemini
audit
clotho
clotho-gemini
codex
darbs-claude
security
wiki
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: core/php-tenant#11
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The
user_workspacepivot table (created inMigrations/0001_01_01_000000_create_tenant_tables.php, lines 90-99) lacks a composite index on(workspace_id, role).Impact
Common queries like "get all owners of workspace X" or "get all admins" require a full table scan over the pivot:
On large deployments with thousands of members across workspaces, this will degrade noticeably.
Acceptance Criteria
(workspace_id, role)touser_workspacepivot tableDiscovered during automated scan (issue #3)