1
Quest
MySQL showing Problems with Indeces, what to do?
  • 2006/7/9 12:59

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


XOOPS 2.0.14
Cloned Template: Yes
templates generated: Yes

General Server Information:

OS: Linux
Apache: 1.3.36 (UNIX)
PHP: 4.4.2
MySQL: 4.1.20 (std.log)
Register_globals: ON

PC Browser

Widnows XP Home Edition
--------------------------------------------------------
--------------------------------------------------------

When running a check on MySQL from Phpadmin I get Status OK for all tables but down at the bottom I have these Warnings/Problems indicated. I have no idea what to do about them. Anyone got an ideas or recommendations?

Problems with indexes of table `xoops1_banner`
PRIMARY and INDEX keys should not both be set for column `bid`

Problems with indexes of table `xoops1_newblocks`
More than one INDEX key was created for column `mid`

Problems with indexes of table `xoops1_priv_msgs`
PRIMARY and INDEX keys should not both be set for column `msg_id`
More than one INDEX key was created for column `to_userid`

Problems with indexes of table `xoops1_ranks`
More than one INDEX key was created for column `rank_min`

Problems with indexes of table `xoops1_smartfaq_answers`
PRIMARY and INDEX keys should not both be set for column `answerid`
Problems with indexes of table `xoops1_smartfaq_categories`
PRIMARY and INDEX keys should not both be set for column `categoryid`
Problems with indexes of table `xoops1_smartfaq_faq`
PRIMARY and INDEX keys should not both be set for column `faqid`

Problems with indexes of table `xoops1_users`
PRIMARY and INDEX keys should not both be set for column `uid`
More than one INDEX key was created for column `uname`

2
Quest
Re: MySQL showing Problems with Indeces, what to do?
  • 2006/7/9 22:09

  • Quest

  • Friend of XOOPS

  • Posts: 1034

  • Since: 2005/11/19


Bump

3
JCDunnart
Re: MySQL showing Problems with Indeces, what to do?
  • 2006/7/10 4:45

  • JCDunnart

  • Not too shy to talk

  • Posts: 114

  • Since: 2006/7/1 5


What to do about them? Ignore them.

1. I think there's a bug with phpMyAdmin. Extra columns aren't recognised when the index begins with the same field as the primary key. In other words, 'banner', 'prv_msgs', 'users' (same primary key/index) are correct despite what phpMyAdmin says.

2. Some indexes aren't needed, so if you want you can safely delete them. Not much point though in my opinion, as the indexes don't even seem to be used.

Anyway, if you want to cleanup your database indexes:

'new_blocks' doesn't need the 'mid' index.
'prv_msgs' doesn't need the 'to_user' index.
'ranks' doesn't need the 'rank_min' index.
'users' doesn't need the 'uname' index.

I don't have smartfaq so can't give any comment on that.

Personally, I'd ignore the 'warnings' - unless I had a very large database, in which case I'd be optimising the queries first, forcing them to use a particular index. As it is, the extra indexes do no harm so I wouldn't bother about them.

Login

Who's Online

153 user(s) are online (84 user(s) are browsing Support Forums)


Members: 0


Guests: 153


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits