Re: mysql and indexes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



use the EXPLAIN infront of your select query to see what indexes are in use.
If you have a double index it wont hurt you, except that you are wasting
twice
as much space in your DB. This would also make your DB slower since the
database
needs to index both indexes all the time.

Duplicate indexes should be avoided since there are no reason to have them.

--
--
Kim Steinhaug
----------------------------------------------------------------------
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
----------------------------------------------------------------------
www.steinhaug.com - www.easywebshop.no - www.webkitpro.com
----------------------------------------------------------------------

"Michael Gale" <michael.gale@xxxxxxxxxxxxxxxx> wrote in message
news:20040616215955.7ef62d13@xxxxxxxxxxxxxxxxxxxxxxxxxxx
> Hello,
>
>    I know this question is more mysql related then PHP with mysql .. but
> ....
>
> If I do a "SHOW INDEX from table_name"
>
> I see what appears to be two index for the same column ?
>
> table_name 0 PRIMARY 1 columnname A NULL NULL NULL
> table_name 0 columnname    1 columnname A 6623 NULL NULL
>
> Could the multiple index cause a problem ? I am trying to speed up a DB
> query ?
>
>
> Michael.
>

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux