• I have a table with an unindexed date column in a table of billions of rows

    I collect the lowest and highest primary keys between those dates into variables

    I set two variables

    declare @min-2 int

    declare @max-2 int

    select @min-2 = min(primarykey) where datecol => 'begindate'

    select @max-2= max(primarykey) where datecol <= 'enddate'

    select primarykey, datecol, x,y,z from table where primarykey between @min-2 and @max-2

    works for me