Hi list, 

I am thinking of upgrading to MySQL v4.1.8, I installed on my local
machine(Windows XP). Copied tables from MySQL v3.23.xx to MySQL 4(eg,
mytest.MYD, mytest.MYI, mytest.frm), it works just fine, query,
sorting as usual.

I created a new table (say 'newtest') with exactly same structure as
'mytest' table under MySQL 4, then select all data from 'mytest' and
insert into 'newtest'. I have two problems here:

the table structure is simple:
CREATE TABLE `newtest` (
  `id` int(11) NOT NULL auto_increment,
  `sessionid` int(11) NOT NULL default '0',
  `timestamp` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `sessionid` (`sessionid`, `timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# or ENGINE=MyISAM

1, If I created table 'newtest' using InnoDB type, inserting 50k
records took me 20min! If I use MyISAM type, inserting took me less
then 1 min. I don't know much about InnoDB but how come the
performance is dropped down so much?

2, Even I choose MyISAM type, the same perl script has another huge
performance difference on 'mytest' which is copied from MySQL 3 and
'newtest' which is created under MySQL 4.

query is simple too, something like:
SELECT id, sessionid, timestamp FROM newtest ORDER BY sessionid DESC
LIMIT 0, 100;

If I didn't use ORDER BY, or use ORDER BY primary key id, performance
is same on these two tables, if I use ORDER BY (sessionid or
timestamp), 'mytest' is 10 times faster than 'newtest'.

Did I do anything wrong? Anyone can help on this?

Thanks a lot.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to