On 23-Sep-2004 Eamon Daly wrote:
> I'm interested in this, too. We have a logging table that
> sees hundreds of rows per second, and we do a ton of monthly
> reports. We just bit the bullet and added an indexed DATE
> column. Is there a better strategy?
>
I do something similar but with MEDIUMIN
I'm interested in this, too. We have a logging table that
sees hundreds of rows per second, and we do a ton of monthly
reports. We just bit the bullet and added an indexed DATE
column. Is there a better strategy?
Eamon Daly
- Origina
If you want to use the index, you cannot put the column through any
function. You have to compare the column value, as is, to constants. For
example,
SELECT SUM(OrderSubTotal) FROM tblOrders
WHERE ShipDate BETWEEN '2004-09-01' AND '2004-09-30';
should do what you want.
Michael
Andrew Kreps