Of the two queries below, which one is faster? The table contains more than 100M records. So I just want to know whether using ISNULL in the where clause is the same as first assigning a value to the variable and only using the variable in the where clause?
declare @dt datetime
select COUNT(*) from pandl
where PaymentDate >= ISNULL(@dt, convert(nvarchar(10),getdate(), 121))
select @dt = ISNULL(@dt, convert(nvarchar(10),getdate(), 121))
select COUNT(*) from pandl
where PaymentDate >= @dt