Re: implicit cast forces table scan?

2005-10-23 Thread Michael Stassen
Gleb Paharenko wrote: Dear, Michael! Did you read my earlier reply? This is neither an optimizer nor > > version issue. I've sent my e-mail before I've read your. The problem is that I was testing my guessing on the table with a bit different structure than your (mine didn't have a primary k

Re: implicit cast forces table scan?

2005-10-23 Thread Gleb Paharenko
Dear, Michael! > Did you read my earlier reply? This is neither an optimizer nor > > > version issue. I've sent my e-mail before I've read your. The problem is that I was testing my guessing on the table with a bit different structure than your (mine didn't have a primary key field 'id').

Re: implicit cast forces table scan?

2005-10-21 Thread Michael Stassen
Gleb Paharenko wrote: > Hello. > > I suggest you to check you query with MySQL 4.1.14 which might has a bit > clever optimizer. Did you read my earlier reply? This is neither an optimizer nor version issue. Consider: mysql> SELECT VERSION(); +---+ | VERSION() | +---+ | 4.1.15

RE: implicit cast forces table scan?

2005-10-21 Thread Olaf Faaland
age- > From: Michael Stassen [mailto:[EMAIL PROTECTED] > Sent: Thursday, October 20, 2005 9:42 PM > To: Olaf Faaland > Cc: 'mysql@lists.mysql.com' > Subject: Re: implicit cast forces table scan? > > > Olaf Faaland wrote: > > Hi, > > > > I am curr

Re: implicit cast forces table scan?

2005-10-21 Thread Gleb Paharenko
Hello. I suggest you to check you query with MySQL 4.1.14 which might has a bit clever optimizer. Olaf Faaland wrote: > Hi, > > I am currently using mysql 4.0.18 as distributed with red hat Linux. I find > when I perform a select on a varchar(30) field, the index is used only if I >

Re: implicit cast forces table scan?

2005-10-20 Thread Michael Stassen
Olaf Faaland wrote: Hi, I am currently using mysql 4.0.18 as distributed with red hat Linux. I find when I perform a select on a varchar(30) field, the index is used only if I have quoted the value in the where clause. Otherwise, mysql performs a table scan. A varchar(30) field is a string,

Re: implicit cast forces table scan?

2005-10-19 Thread Jeff Smelser
On Wednesday 19 October 2005 01:15 pm, Olaf Faaland wrote: > The queries in question are: > > This query uses the index: > mysql> explain > -> select itran_log_date, itran_log_actionid from itran_log where > -> itran_log_actionid = "170807"; > > This query performs a table scan: > mysql> ex