Why is Count(*) Taking So Long

Phone rings……..I answer…….a DBA from a third party vendor has supplied someone with two scripts. The first script is a simple insert with a where clause: insert into [databasename].[dbo].[tablename] ( column1,column2, column3, column4 ) select column1, column2, column3, column4 from [databasename].[dbo].[tablename] where column1<[integeramount] and column1>[integeramount] First question I ask; how much data is loading into … Continue reading Why is Count(*) Taking So Long