Please cc me as I'm not on this list. Thanks. root[csh]@amber1[15]# mysql --version mysql Ver 11.18 Distrib 3.23.52, for sun-solaris2.9 (sparc) root[csh]@amber1[16]# /usr/local/mysql/libexec/mysqld --version /usr/local/mysql/libexec/mysqld Ver 3.23.52 for sun-solaris2.9 on sparc
Scripts are written in root[csh]@amber1[17]# perl -v This is perl, v5.6.1 built for sun4-solaris-64int Using DBD::mysql. As suggested at http://www.mysql.com/doc/en/Insert_speed.html I am using load data infile on a table with indexes turned off. My loading script croaks with two different errors. I have a number of files to load and some of them die reporting Duplicate key for record at XXXXX against record at YYYYY while other files tell me failed: Wrong bytesec: 54-49-50 at 365240; ... The duplicate key problem I can handle but I can't figure out which records the message is refering to. Would someone point me to the right place to look in my datafiles? I don't know where to begin with the "wrong bytesec" message. Searching google and mailing lists, it seems only to come up with isamchk. Turning indexing back on my table and loading data runs smoothly but I'd like have the added speed of a single inde at the end of my script run as I'm often adding millions of entries. Code snippets: $sth = $dbh->prepare("DROP TABLE IF EXISTS $table"); $sth->execute(); $sth = $dbh->prepare("create table $table (uid mediumint ... "); $sth->execute(); $sth = $dbh->prepare("FLUSH TABLE $table"); $sth->execute(); `$myisamchk --keys-used=0 -rq $mysqldata/$table` $sth = $dbh->prepare("LOAD DATA LOCAL INFILE ? IGNORE INTO TABLE $table"); Open the directory containing the data files and load them one by one. $sth->execute( $file ); $myisamchk -rq -O key_buffer_size=256M -O read_buffer_size=64M -O write_buffer_size=128M -O sort_buffer_size=128M $mysqldata/$table $sth = $dbh->prepare("FLUSH TABLE $table"); $sth->execute(); Error messages: Opening directory /usr/local/mysql/rawdata/hanwk16 Loading file 1/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050605.1811 DBD::mysql::st execute failed: Duplicate key for record at 164984 against record at 154696 at /home/brundage/work/projects/HomeDir_Cleanup/scripts/loaddata.pl line 107. Loading file 2/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050627.1812 DBD::mysql::st execute failed: Duplicate key for record at 201900 against record at 162992 at /home/brundage/work/projects/HomeDir_Cleanup/scripts/loaddata.pl line 107. Loading file 3/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050642.1813 DBD::mysql::st execute failed: Duplicate key for record at 407136 against record at 8972 at /home/brundage/work/projects/HomeDir_Cleanup/scripts/loaddata.pl line 107. Loading file 4/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050675.1814 DBD::mysql::st execute failed: Wrong bytesec: 54-49-50 at 365240; Skipped at /home/brundage/work/projects/HomeDir_Cleanup/scripts/loaddata.pl line 107. Loading file 5/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050740.1815 DBD::mysql::st execute failed: Wrong bytesec: 46-47-50 at 332316; Skipped at /home/brundage/work/projects/HomeDir_Cleanup/scripts/loaddata.pl line 107. Loading file 6/1089: /usr/local/mysql/rawdata/hanwk16/hanwk16.1034050773.1818 DBD::mysql::st execute failed: Wrong bytesec: 45-48-53 at 251544; Skipped at /ho Thanks for the help. --Dean - Unscrambler of eggs -- Quality Web Hosting http://www.3llamas.com -------------------------------------------------------------------------------- It matters not how strait the gate / How charged with punishment the scroll I am the master of my fate / I am the captain of my soul. -- Invictus -- -- William E Henley -- --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php