Skip to content

Commit 9694ec6

Browse files
committed
docs(db): say the upload-order index serves the list and its seed
1 parent c6468fe commit 9694ec6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎packages/db/migrations/0442_workspace_files_active_uploaded_idx.sql‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
-- A workspace's live file list, in upload order. No index served the list's filter in that
22
-- order, so the planner matched every workspace's live files, filtered to one workspace on the
3-
-- heap and sorted them, on disk for a large workspace; a bounded read (the SSR seed, an
4-
-- uploadedAt keyset page) paid for the whole workspace.
3+
-- heap and sorted them, on disk for a large workspace; a bounded read (the SSR seed) paid for
4+
-- the whole workspace.
55
--
66
-- The predicate is the one the other live workspace-file indexes share, which the list's filter
77
-- implies. The list's owner conditions (project_id and organization_id IS NULL) stay heap checks

‎packages/db/schema.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2936,7 +2936,7 @@ export const workspaceFiles = pgTable(
29362936
.where(
29372937
sql`${table.deletedAt} IS NULL AND ${table.context} = 'workspace' AND ${table.workspaceId} IS NOT NULL`
29382938
),
2939-
/** Serves a workspace's live file list and uploadedAt keyset pages in upload order. */
2939+
/** Serves a workspace's live file list, and its bounded SSR seed, in upload order. */
29402940
workspaceActiveUploadedIdx: index('workspace_files_workspace_active_uploaded_idx')
29412941
.on(table.workspaceId, table.uploadedAt, table.id)
29422942
.concurrently()

0 commit comments

Comments
 (0)