Hi Alexander, I believe that the the 'count()' function works differently under INNODB type tables. With MyISAM count(*) is stored in a 'table status' area, but INNODB must scan the tables and count the rows (very slow). All other types of queries should perform much better for you, but 'count(*)' is not impelemented the same way. Hope this helps,
Ken ----- Original Message ----- From: "Varshavchick Alexander" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, September 03, 2002 3:56 AM Subject: Innodb too slow > Hi, > > why innodb queries work MUCH slower (100 times) than if the table was of > myisam type? It's mysql 4.0.3 on FreeBSD 4.5 server. The innodb monitor > outputs many messages like the following, why are they there and what do > they mean? > > Purge done for trx's n:o < 0 782 undo n:o < 0 0 > Total number of lock structs in row lock hash table 0 > LIST OF TRANSACTIONS FOR EACH SESSION: > ---TRANSACTION 0 3811, ACTIVE 0 sec, OS thread id 10250 fetching rows > MySQL thread id 2, query id 3044 localhost handy Sending data > SELECT count(*) from stat > Trx read view will not see trx with id >= 0 3812, sees < 0 3807 > ---TRANSACTION 0 3810, ACTIVE 1 sec, OS thread id 12300 fetching rows > MySQL thread id 4, query id 3043 localhost handy Sending data > SELECT count(*) from stat > Trx read view will not see trx with id >= 0 3811, sees < 0 3806 > ---TRANSACTION 0 3809, ACTIVE 1 sec, OS thread id 13325 fetching rows > MySQL thread id 5, query id 3042 localhost handy Sending data > SELECT count(*) from stat > Trx read view will not see trx with id >= 0 3811, sees < 0 3806 > ---TRANSACTION 0 3808, ACTIVE 1 sec, OS thread id 14350 fetching rows > MySQL thread id 6, query id 3041 localhost handy Sending data > SELECT count(*) from stat > Trx read view will not see trx with id >= 0 3809, sees < 0 3804 > ---TRANSACTION 0 3807, ACTIVE 1 sec, OS thread id 11275 fetching rows > MySQL thread id 3, query id 3040 localhost handy Sending data > SELECT count(*) from stat > Trx read view will not see trx with id >= 0 3808, sees < 0 3803 > > Any help will be appreciated, thanks! > > ---- > Alexander Varshavchick, Metrocom Joint Stock Company > Phone: (812)118-3322, 118-3115(fax) > > > -------------------------------------------------------------------- - > 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 > > --------------------------------------------------------------------- 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
