Thanks for your time, here's the main table:CREATE TABLE [dbo].[Tx]( [TxID] [int] IDENTITY(1,1) NOT NULL, [TxDateTime] [date] NULL, [Amount] [money] NULL, [Description] [varchar](100) NULL, [CreatedDateTime] [date] NULL, [RemoteTxID] [int] NULL, [RemoteSequenceNr] [int] NULL, [InvoiceNumber] [varchar](50) NULL, [AuthID] [int] NULL, [TradeSystemID] [int] NULL, [TxStatusID] [int] NULL, [WarehouseID] [int] NULL, [TxTypeID] [int] NULL, [AccountNumber] [varchar](50) NULL, CONSTRAINT [Pk_Tx] PRIMARY KEY CLUSTERED ( [TxID] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY]
The query:select sum(Amount) from Tx where AccountNumber='ABC001'
On 3 million records it takes about 600ms (On SSD drive), going up almost exponentially as the number of rows double.Regards,Hein