[05:04:16.914] INFO (#1): Running database migrations [05:04:17.213] INFO (#1): Migrations ran successfully { migrations: [ '1_OrchestrationEvents', '2_OrchestrationCommandReceipts', '3_CheckpointDiffBlobs', '4_ProviderSessionRuntime', '5_Projections', '6_ProjectionThreadSessionRuntimeModeColumns', '7_ProjectionThreadMessageAttachments', '8_ProjectionThreadActivitySequence', '9_ProviderSessionRuntimeMode', '10_ProjectionThreadsRuntimeMode', '11_OrchestrationThreadCreatedRuntimeMode', '12_ProjectionThreadsInteractionMode', '13_ProjectionThreadProposedPlans', '14_ProjectionThreadProposedPlanImplementation', '15_ProjectionTurnsSourceProposedPlan', '16_CanonicalizeModelSelections', '17_ProjectionThreadsArchivedAt', '18_ProjectionThreadsArchivedAtIndex', '19_ProjectionSnapshotLookupIndexes', '20_AuthAccessManagement', '21_AuthSessionClientMetadata', '22_AuthSessionLastConnectedAt', '23_ProjectionThreadShellSummary', '24_BackfillProjectionThreadShellSummary', '25_CleanupInvalidProjectionPendingApprovals', '26_CanonicalizeModelSelectionOptions', '27_ProviderSessionRuntimeInstanceId', '28_ProjectionThreadSessionInstanceId', '29_ProjectionThreadDetailOrderingIndexes', '30_ProjectionThreadShellArchiveIndexes', '31_AuthAuthorizationScopes', '32_AuthPairingProofKeyThumbprint', '33_ProjectionThreadsSettled', '34_ProjectionThreadsSnoozed', '35_ProjectionThreadTitleRegeneration', '36_ProjectionThreadsPinned', '37_ProjectionTurnsKeysetIndex', '38_ProjectionThreadsPinOrderKey', '39_ProjectionProjectsDefaultThreadEnvMode', '40_ProjectionProjectFaviconPath', '41_AuthSessionClientConnection', '42_ProjectionThreadLinkedPullRequest', '43_ProjectionThreadsUnsettledAt', '44_ClearAutomaticProjectModelDefaults', '45_ProjectionProjectsAutoPull', '46_RepairAutomaticSettlementTimestamps', '47_ProjectionProjectIcon', '48_ProjectionThreadBranchPullRequest', '49_ProjectionThreadsActiveOrderKey', '50_ProjectionThreadPullRequests', '51_ProjectionThreadMessageContext', '52_ProjectionThreadTitleState', '53_PullRequestFilesViewed', '54_ProjectionThreadsAutoSettleDisabledAt', '55_OrchestrationV2', '56_RemoveRedundantProjectionIndexes', '57_ScheduledTaskWebhooks', '58_WebhookRelayDeliveries', '59_McpAppModelContext', '60_ThreadSnapshotWindowIndexes', '61_PullRequestReviewGuides', '62_ThreadFailureLookupIndex', '63_DropUnusedV1Projections', '64_CanonicalizeThreadPullRequestLinks', '65_CodexUsageNativeTurnIndex', '66_RepairClientSettlementTimestamps', '67_WebhookDedupe', '68_ShellStopRequestIndex', '69_ThreadMessageSearch', '70_PeerLinks', '71_PeerLinkFence', '72_WaitingLinkRequestIndex', '73_ActiveTurnItemIndexes', '74_ExcludeAttachmentPlaceholdersFromSearch', '75_SubagentDeliveryState', '76_ProjectionProjectsPinArchive', '77_RepairBooleanSettledOverride', '78_DropOrchestrationEventCorrelationIndex', '79_DelegatedRecoveryIndexes', '80_ScheduledTaskThreadMode', '81_ProjectionMessageSearchText', '82_TurnItemConversationIndex', '83_CommandReadIndexes', '84_LastExecutedRunIndex', '85_TurnItemCounts', '86_QueuedTurnInputIndex', '87_ProjectionProjectsCustomTitle', '88_TurnItemTypeStatusIndex', '89_ShellThreadReadIndexes', '90_AuthConnectDevices', '91_AuthConnectDeniedRequests', '92_QueuedTurnInputIndexJsonValid', '93_ProviderTurnAttemptIndex', '94_TurnItemMessageOrdinalIndex', '95_TurnItemInlineWorkOutput', '96_RepairStaleTitleRegeneration', '97_IssueTrackerBindings', '98_ActiveShellIndexIndexes', '99_BackgroundRecoveryIndexes', '100_TurnStartReadIndexes', ... 20 more items ] } { "commit": "b4a1af4c7dc36f494cf95dff905405cf6e7382dc", "platform": "win32", "osRelease": "10.0.26100", "arch": "x64", "node": "v26.13.1", "sqlite": "3.54.1", "items": 30000, "runs": 6, "seed": [ { "type": "assistant_message", "status": "completed", "count": 15000 }, { "type": "user_message", "status": "completed", "count": 15000 } ], "warmups": 5, "measuredRuns": 9, "summary": [ { "scenario": "no compaction", "actionMs": [ 5.885099999999511, 5.591100000001461, 5.757799999999406, 5.693300000002637, 5.563500000000204, 5.496800000000803, 5.424800000000687, 5.434499999999389, 5.405900000001566 ], "returnedMessages": [ [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ] ], "sqlMs": [ 0.21860000000015134, 0.22149999999965075, 0.24109999999927823, 0.2132000000019616, 0.21489999999903375, 0.21120000000155414, 0.2088000000003376, 0.2114000000001397, 0.21000000000276486 ], "medianSqlMs": 0.2132000000019616, "spreadSqlMs": 0.03229999999894062, "medianActionMs": 5.563500000000204, "samples": [ { "scenario": "no compaction", "ms": 0.21860000000015134, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.22149999999965075, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.24109999999927823, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.2132000000019616, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.21489999999903375, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.21120000000155414, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.2088000000003376, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.2114000000001397, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "no compaction", "ms": 0.21000000000276486, "vmSteps": 55, "runIds": [], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] } ] }, { "scenario": "early compaction plus later rolled-back compaction", "actionMs": [ 5.700299999996787, 5.5711000000010245, 5.089299999999639, 5.458899999997811, 5.539000000000669, 5.861699999997654, 6.066900000001624, 5.957699999999022, 5.786199999998644 ], "returnedMessages": [ [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ], [ "message:1", "message:2", "message:3", "message:4", "message:5", "message:6" ] ], "sqlMs": [ 0.24060000000099535, 0.23709999999846332, 0.21900000000096043, 0.26929999999993015, 0.23729999999704887, 0.23059999999895808, 0.297099999999773, 0.2422999999980675, 0.25340000000142027 ], "medianSqlMs": 0.24060000000099535, "spreadSqlMs": 0.07809999999881256, "medianActionMs": 5.700299999996787, "samples": [ { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.24060000000099535, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.23709999999846332, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.21900000000096043, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.26929999999993015, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.23729999999704887, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.23059999999895808, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.297099999999773, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.2422999999980675, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] }, { "scenario": "early compaction plus later rolled-back compaction", "ms": 0.25340000000142027, "vmSteps": 248, "runIds": [ "run:1", "run:2", "run:3", "run:4", "run:5", "run:6" ], "plan": [ "MERGE (UNION)", "LEFT", "MATERIALIZE compaction", "SEARCH item USING INDEX orchestration_v2_projection_turn_items_thread_type_idx (thread_id=? AND type=? AND status=?)", "SEARCH run USING INDEX sqlite_autoindex_orchestration_v2_projection_runs_1 (run_id=?)", "USE TEMP B-TREE FOR ORDER BY", "SCAN compaction", "SEARCH run USING INDEX orchestration_v2_projection_runs_thread_ordinal_idx (thread_id=?)", "USE TEMP B-TREE FOR ORDER BY", "RIGHT", "SEARCH message USING INDEX sqlite_autoindex_orchestration_v2_projection_messages_1 (message_id=?)", "SCAN compaction" ], "sql": "\n WITH compaction AS (\n SELECT run.ordinal, run.requested_at\n FROM orchestration_v2_projection_turn_items AS item\n INDEXED BY orchestration_v2_projection_turn_items_thread_type_idx\n INNER JOIN orchestration_v2_projection_runs AS run ON run.run_id = item.run_id\n WHERE item.thread_id = ?\n AND item.type = 'compaction' AND item.status = 'completed'\n AND run.status <> 'rolled_back'\n ORDER BY item.ordinal DESC\n LIMIT 1\n )\n SELECT run.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_runs AS run ON run.thread_id = ?\n WHERE run.ordinal >= compaction.ordinal\n OR run.completed_at IS NULL\n OR run.completed_at >= compaction.requested_at\n OR run.status IN ('queued', 'preparing', 'starting', 'running', 'waiting')\n UNION\n SELECT message.run_id\n FROM compaction\n INNER JOIN orchestration_v2_projection_messages AS message\n ON message.message_id = ?\n WHERE message.thread_id = ? AND message.run_id IS NOT NULL\n ", "params": [ "thread:proof", "thread:proof", "message:1", "thread:proof" ] } ] } ] }