Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is one way more efficient than the other
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Maintenance bases de données
Titre:
Is one way more efficient than the other
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01333475
Message ID:
01333475
Vues:
47
Hello all,

I have a stored procedure that is used for a report that needs to return rows based on selection criteria passed as parameters. Two of the parameters are datetime fields. The parameters are testing for a from date and to date based on one datetime field in a view.

Is either one of these more efficient:

1.) where tradeDate >= @FromDate and tradeDate <= @ToDate OR
2.) where tradeDate between @FromDate and @ToDate

Now I do have an index on this datetime field (which will always have midnight as the time).

Any ideas or suggestions are appreciated.

Thanks.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform