MySQL Forums
Forum List  »  General

Re: Table Locking Memory Engine
Posted by: Rick James
Date: August 09, 2011 10:52PM

This is probably why InnoDB is so slow:
| innodb_flush_log_at_trx_commit | 1 |
Change it to 2. That will eliminate most (not all) of the I/O.

This is good (assuming you have at least 2GB of RAM):
| innodb_buffer_pool_size | 1073741824 |

ALTER TABLE `users` ADD INDEX(timeout);

Or change the definition to
...
PRIMARY KEY (`id`),
INDEX(user,ip),
INDEX(timeout)
) ENGINE=...

> SHOW PROCESSLIST is SELECT about 2-3 of them
How many SELECTs, per second, are you trying to do?

What version of MySQL are you running?

When you use MEMORY, VARCHARs become CHARs. So your VARCHAR(2000) is taking 2000 bytes. In MyISAM or InnoDB, that field takes the actual length, plus 2 bytes.

Options: ReplyQuote


Subject
Written By
Posted
August 07, 2011 12:41AM
Re: Table Locking Memory Engine
August 09, 2011 10:52PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.