Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Composite index with datetime field
Message
 
 
To
31/07/2007 13:30:41
General information
Forum:
Microsoft SQL Server
Category:
Database design
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01244926
Message ID:
01244930
Views:
21
This message has been marked as the solution to the initial question of the thread.
There're no composite indexes in SQL Server. You have to include each column into the where clause separatelly.
... WHERE CharacterField1 = CharValue1 
      AND DateTimeField = DateTimeValue
      AND CharacterField2 = CharValue2 
>I have a composite index which consist of character field, DateTime field, character field.
>
>When I try to select record by using CharField + CAST(DateTimeField AS CHAR(8)) + CharField2 expression, it doesn't seem to be optimized.
>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform