Problem with MySQL indexes ?

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Julien@TLD
Normal user
Normal user
Posts: 57
Joined: 2005-09-12 11:57
Location: Marseille - France

Problem with MySQL indexes ?

Post by Julien@TLD » 2006-11-21 11:24

Hello,

I opened the hMailServer database with PHPMyAdmin and I see that the tables structure is strange for the indexes. In effet, each primary key of each table is also present like an index. Why creating two indexes on the same column? For me just one index (the primary key) is suffisant for optimal performances, no ?

An other thing, the table hm_messages has a primary key on messageid and also an unique key on messageid. Why? It's the same thing. Probably same behavior in other tables.

I use hMailServer 4.3 build 248 with my own 4.1 MySQL server. This indexes problem structure was also present with hMailServer 4.2. I have well upgraded the data base structure during the installation of hMailServer 4.3.

Julien@TLD
Normal user
Normal user
Posts: 57
Joined: 2005-09-12 11:57
Location: Marseille - France

Post by Julien@TLD » 2006-11-23 10:40

UP ;)

User avatar
martin
Developer
Developer
Posts: 6846
Joined: 2003-11-21 01:09
Location: Sweden
Contact:

Post by martin » 2006-11-23 12:38

Haven't had the time to look into this yet, but I know some of the indexes doesn't make sense and are redundant. Is there a performance problem for you or are you just curious?

Julien@TLD
Normal user
Normal user
Posts: 57
Joined: 2005-09-12 11:57
Location: Marseille - France

Post by Julien@TLD » 2006-11-23 14:28

No, it's not really a problem for me and it's function well. I am just curious like you say :)

In fact, it could be a little performance problem on large servers because mysql have to update each time the multiple indexes instead of one.

Bye.

Post Reply