Walt,

----- Original Message -----
From: "walt" <[EMAIL PROTECTED]>
To: "Heikki Tuuri" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Tuesday, October 15, 2002 5:56 PM
Subject: Re: innodb not using correct index


> Heikki Tuuri wrote:
>
> > Walt,
> >
> > ----- Original Message -----
>
...
>
> Heikki,
> Thanks for you answer!
> I found what appears to be a tweak (I'd say BUG but the info is correct)
needed
> with mysql.
> If I make this query a range on the date, it takes less than a second to
return
> the result even though the
> ending date I'm using is > the max(date) in the table.
>
>
> Example:
>
> mysql> select max(CREATE_DATE) FROM XRAY;
> +---------------------+
> | max(CREATE_DATE)    |
> +---------------------+
> | 2002-10-03 20:12:57 |
> +---------------------+
> 1 row in set (0.07 sec)
>
> select several_fields from xray
>  where create_date > '2002-10-03'
>  and cust_id = 'TEST1';
>
> Takes about 1 1/2 minutes
>
> select several_fields from xray
>  where create_date > '2002-10-03'
> and create_date < '2002-10-03 23:59:59'
> and cust_id = 'TEST1';
>
> Takes less than a second.
>
> Problem solved!

I guess 3.23.53 solves exactly this optimization glitch. Unfortunately, Lenz
seems to have built max-3.23.53 without InnoDB, and you have to wait to
tomorrow to test it.

> Thanks again Heikki!
>
> walt

Thank you!

Heikki

sql query



---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to