Re: why doesn't mysql select the correnct index?

2008-04-15 Thread Sebastian Mendel
Changying Li schrieb: why does mysql use group_id index ? because in this case group_id would be faster than user_id but in fact group_id is very slow (51.21 sec), user_id is (0.00 sec) ok, at least MySQL does think so I know, but I what I really want to know is how does mysql think so ?

Re: why doesn't mysql select the correnct index?

2008-04-15 Thread Changying Li
Sebastian Mendel [EMAIL PROTECTED] writes: Changying Li schrieb: why does mysql use group_id index ? because in this case group_id would be faster than user_id but in fact group_id is very slow (51.21 sec), user_id is (0.00 sec) ok, at least MySQL does think so I know, but I what I really

why doesn't mysql select the correnct index?

2008-04-14 Thread Changying Li
Hi. there is a table photo and two queries: mysql show index from photo; mysql show index from photo;

Re: why doesn't mysql select the correnct index?

2008-04-14 Thread Sebastian Mendel
Changying Li schrieb: Hi. there is a table photo and two queries: mysql show index from photo; mysql show index from photo;

Re: why doesn't mysql select the correnct index?

2008-04-14 Thread Changying Li
Sebastian Mendel [EMAIL PROTECTED] writes: Changying Li schrieb: Hi. there is a table photo and two queries: mysql show index from photo; mysql show index from

Re: why doesn't mysql select the correnct index?

2008-04-14 Thread Sebastian Mendel
Changying Li schrieb: Sebastian Mendel [EMAIL PROTECTED] writes: Changying Li schrieb: Hi. there is a table photo and two queries: mysql show index from photo; mysql

Re: why doesn't mysql select the correnct index?

2008-04-14 Thread Changying Li
why does mysql use group_id index ? because in this case group_id would be faster than user_id but in fact group_id is very slow (51.21 sec), user_id is (0.00 sec) ok, at least MySQL does think so I know, but I what I really want to know is how does mysql think so ? how to let mysql choose