1
巨大(100,000,000+)表的GROUP TOP(1)BY GROUP
设定 我有一个约115,382,254行的巨大表。该表相对简单,并且记录了应用程序的处理操作。 CREATE TABLE [data].[OperationData]( [SourceDeciveID] [bigint] NOT NULL, [FileSource] [nvarchar](256) NOT NULL, [Size] [bigint] NULL, [Begin] [datetime2](7) NULL, [End] [datetime2](7) NOT NULL, [Date] AS (isnull(CONVERT([date],[End]),CONVERT([date],'19000101',(112)))) PERSISTED NOT NULL, [DataSetCount] [bigint] NULL, [Result] [int] NULL, [Error] [nvarchar](max) NULL, [Status] [int] NULL, CONSTRAINT [PK_OperationData] PRIMARY KEY CLUSTERED ( [SourceDeviceID] ASC, [FileSource] …