MySQL 4.1.12-standard: Can't find key for index: 3

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
visionmaster
Forum Contributor
Posts: 139
Joined: Wed Jul 14, 2004 4:06 am

MySQL 4.1.12-standard: Can't find key for index: 3

Post by visionmaster »

Hello together,

I'm having a major problem with a table of mine holding 1,805,771 rows. The table often crashes, a

Code: Select all

REPAIR table suchmaschine_produkte
has to be done on a daily basis.

This is my table structure:

CREATE TABLE `suchmaschine_produkte` (
`idsuchmaschine_produkte` int(10) unsigned NOT NULL auto_increment,
`produktname` varchar(120) collate latin1_german1_ci NOT NULL default '',
`verwendung` varchar(100) collate latin1_german1_ci NOT NULL default '',
`eigenschaft` varchar(100) collate latin1_german1_ci NOT NULL default '',
`id_firmendaten` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`idsuchmaschine_produkte`),
KEY `id_firmendatenIndex` (`id_firmendaten`),
KEY `productnameIndex` (`produktname`(40))
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci AUTO_INCREMENT=4324527 ;


Space usage Type Usage
Data 59,113 KB
Index 48,308 KB
Overhead 40 Bytes
Effective 107,421 KB
Total 107,421 KB

Row Statistics Statements Value
Format dynamic
Collation latin1_german1_ci
Rows 1,805,771
Row length ø 33
Row size ø 61 Bytes
Next Autoindex 4,324,527

I did the following to debug the table:

Code: Select all

CHECK TABLE suchmaschine_produkte EXTENDED
See also http://www.databasejournal.com/features ... hp/3300511 for reference.

=> This is outputed:

Table Op Msg_type Msg_text
itsbetter.suchmaschine_produkte check warning Table is marked as crashed
itsbetter.suchmaschine_produkte check error Record at: 18202980 Can't find key for index: 3
itsbetter.suchmaschine_produkte check error Corrupt


And this even after a REPAIR TABLE has been done. Strangely enough I can browse the tables content using phpMyAdmin.

What exactly does "Record at: 18202980 Can't find key for index: 3" mean? Can empty records also be a problem?


Thanks very much for your help!
visionmaster
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I'm not sure what that error is, but it sounds bad that CHECK finds errors and REPAIR does not fix them. Maybe a filesystem problem? You might want to dump this table to SQL file, rename the table, then create a new table and import the data
(#10850)
Post Reply