Re: index problem

2011-07-28 Thread xucheng
thanks . i dropped the primary key , and it still didn't use the index . when i dropped the index `range`, and add two indexes `start` and `end` . it picks up the index , but it still used more seconds than using no index with `start` and `end` indexed as one --`range`. 2011/7/28 Johan De Meersman

Re: index problem

2011-07-28 Thread Rik Wasmus
[Note to self, reply to mailinglist, not to author ;) ] > i found a strange problem . when i using index for 'select' , i > got a slower result than without index . > i have a tabe : > create table geo_query ( > `id` int(10) unsigned not null auto_increment , >

Re: index problem

2011-07-28 Thread Johan De Meersman
The optimizer is right, you are wrong, as simple as that :-) between [field1] and [field2] cannot use indices, as your primary reference is a constant, not a field. Rewrite that to "start >= 1988778880 and end <= 1988778880" and the optimizer should pick up the index. Index hints are rarely ev

Re: Index problem ?

2005-04-21 Thread Keith Ivey
Michael Gale wrote: When I run the following: `Select DISTINCT machine from syslog WHERE date1 > (NOW() - INTERVAL 1 hour);' it takes 9min to complete. If I use "Explain" it says the query is using index "hostname", should it not be using the index "hostdate" which contains fields "machine" and "

Re: Index problem

2004-07-01 Thread Egor Egorov
"Oropeza Querejeta, Alejandro" <[EMAIL PROTECTED]> wrote: > Hi, i'm trying to create an index on a table with 199 million records. > The problem is that is taking too long (8 hours and is not yet > finnished). > does anyone have any idea? Wait until it finishes.:) We have tables where index cre

Re: Index problem

2004-06-30 Thread David Griffiths
some_index on table(folio2(5)); to only index part of the data? David Oropeza Querejeta, Alejandro wrote Below are the answers Best Regards -Mensaje original- De: David Griffiths [mailto:[EMAIL PROTECTED] Enviado el: MiƩrcoles, 30 de Junio de 2004 01:29 p.m. Para: [EMAIL PROTECTED] As

RE: Index problem

2004-06-30 Thread Oropeza Querejeta, Alejandro
Below are the answers Best Regards -Mensaje original- De: David Griffiths [mailto:[EMAIL PROTECTED] Enviado el: MiƩrcoles, 30 de Junio de 2004 01:29 p.m. Para: [EMAIL PROTECTED] Asunto: Re: Index problem What's the definition of the table? IE are you indexing an INT, VARCHAR, e

Re: Index problem

2004-06-30 Thread David Griffiths
What's the definition of the table? IE are you indexing an INT, VARCHAR, etc? What's the definition of the index? Is it unique, composite, etc? What's the storage engine in use? InnoDB? MyISAM? Can you show the relevant parts of your my.cnf file? What operating system are you using? David Oropeza

Re: index problem

2003-01-16 Thread Steve Edberg
At 2:31 AM -0700 1/16/03, Prasanth Krishna wrote: hi i have a database with a single table say tbl1 with an index on a particular field say col1. when i say select * from tbl1; it doesn't use the index on that table. In this query, I can't see any reason to use an index...MySQL is simply re

RE: index problem

2003-01-16 Thread Simon Green
In the first statement you are selecting * (ALL the row) from tbl1 with no restricting comment (e.g. where) so if you are going to select every thing in the table you do not need to use the index (MySQL uses B-tree). Simon -Original Message- From: Prasanth Krishna [mailto:[EMAIL PROTECTED

Re: index problem

2002-01-22 Thread Sommai Fongnamthip
I was try with explain or describe command. The result in column 'type' show 'ALL' , column ' possible keys' show index name I was created. I wonder that why did not use index it take a long time (look like computer hang). SF At 14:23 22/1/2002 +0700, Kittiphum Worachat wrote: >Hi > >Try t

Re: index problem

2002-01-21 Thread Kittiphum Worachat
Hi Try to check your query by this command explain select * from holder, management where holder.id=management.id or (holder.name=management.name and holder.surname=management.surname) order by holder.no and let take a look the result if they say the result come from ALL record it mean you can'

Re: Index problem (I think) with MySQL 3.23.36 on Solaris -- hang

2001-10-30 Thread Robert Alexander
Responding to my own email... sheesh. It's just that kinda day. :> I found reference in the archives to what seems to be the same problem. Monty replied to a thread entitled "I got it hanged !" on 2001-07-17, and agreed that it shouldn't be happening. Unfortunately, I can't find a solution in