Hi,

I was wondering, whether it is a bug or normal behavior:

Having a table foo containing a date-field named "bar", and defined as an index, I run a select as:

explain select * from foo where bar between '2005-01-01' and '2005-01-31'

the index over bar is used. But since I don't know the maximum number of days I used subdate('2005-02-01', 1) for calculating the last day of the Month. But when using this inside my query as:

explain select * from foo where bar between '2005-01-01' and subdate('2005-02-01', 1)

maxdb performs a tablescan instead of using the index. This behavior started after upgrading from 7.3.??? to 7.5.21 - as far as I can remember.

From my point of view, there is no point in doing a tablescan, so I would call it a bug..

Thanks,

Dirk Zugenmaier

-------------------------------
 Universit�tsklinikum Freiburg
 Klinikrechenzentrum, Abt. PDV
 Agnesenstr. 6-8
 79106 Freiburg
-------------------------------

--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to