Hi,

Sinisa Milivojevic:
>  > >>> explain ticketid;
>  > Field  Type         Null Key Default Extra
>  > id     varchar(100)      PRI              
>  > 
>  > >>> show index from ticketid;
>  > Table    Non_unique Key_name Seq_in_index Column_name Collation
>  > ticketid          0 PRIMARY             1 id          A        
> 
> After taking a look at your table, the answer to your question is
> YES. varchar(100) is too  large for index.
> 
Ummm, I wasn't really asking a question, I was reporting the problem
that

        select * from ticketid where id like "123%"

correctly uses the above index, but a more restrictive query, i.e.

        select * from ticketid where id like "123%" and id = 123

doesn't. This is _not_ the expected result.

-- 
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/
-- 
The decent moderation of today will be the least human of things
tomorrow. At the time of the Spanish Inquisition, the opinion of good
sense and of the good medium was certainly that people ought not to burn
too large a number of heretics; extreme and unreasonable opinion
obviously demanded that they burn none at all.
                                -- Maurice Maeterlinck

---------------------------------------------------------------------
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