Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Making use of dates in index
Message
 
 
À
02/05/2011 21:29:53
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Indexation
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01509138
Message ID:
01509143
Vues:
39
>Some are using a numeric equivalent for a date to optimize the indexing. It is known that using a date in a SQL command is not as optimized as using only integers for example. This is especially true if you use the date field twice such as greater than and less date values. What would be the proper technique to have an equivalent integer field to represent the date field so to use it in SQL commands?
>
>I understand there is some kind of equivalent values which would also includes the hours, minutes, seconds and milliseconds.
>
>Any techniques that are better than another one in this type of support?

IMHO, index on date field (SQL Server 2008) or index on datetime field is all you need. I don't think you need to use any integer conversions, unless you build facts table.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform