InnoDB thread concurrency

InnoDB has a mechanism to regulate count of threads working inside InnoDB.
innodb_thread_concurrency is variable which set this count, and there are two friendly variables
innodb_thread_sleep_delay and innodb_concurrency_tickets. I’ll try to explain how it works.
MySQL has pluginable architecture which divides work between mysql common code
(parser, optimizer) and storage engine. From storage engine’s point of view it […]

Read more

Indexes in MySQL

MySQL does not always make a right decision about indexes usage.
Condsider a simple table:

Shell

CREATE TABLE `t2` (
`ID` int(11) default NULL,
`ID1` int(11) default NULL,
`SUBNAME` varchar(32) default NULL,
KEY `ID1` (`ID1`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

123456

CREATE TABLE `t2` (`ID` int(11) default NULL,`ID1` int(11) default NULL,`SUBNAME` varchar(32) default NULL,KEY `ID1` (`ID1`)) ENGINE=MyISAM DEFAULT CHARSET=latin1

Shell

SELECT COUNT(*) FROM t2

1

SELECT COUNT(*) FROM t2

;
250001 […]

Read more

InnoDB memory usage

There are many questions how InnoDB allocates memory. I’ll try to give some explanation about the memory allocation at startup.
Some important constants:
NBLOCKS=count of block in innodb_buffer_pool = innodb_buffer_pool_size / 16384
OS_THREADS= if (innodb_buffer_pool_size >= 1000Mb) = 50000
else if (innodb_buffer_pool_size >= 8Mb) = 10000
else = 1000 (it’s true for *nixes, for Windows there is a bit […]

Read more

MySQL INSERT ON DUPLICATE KEY UPDATE and counters

MySQL INSERT ON DUPLICATE KEY UPDATE is very powerful but often forgotten MySQL feature. It was introduced in MySQL 4.1 but I still constantly see people unaware of it.
Myself I like this feature big deal because it is designed in truly MySQL style – very efficient solution for frequent task while keeping it beautiful […]

Read more

Jeremy Cole on MySQL Replication

Jeremy Cole recently posted very nice post about MySQL Replication Performance. There are however few points I should comment on.

Jeremy Speaks about MyISAM and Innodb in the same terms, in fact they are quite different for Replication. As you probably know MyISAM uses buffered IO so if master crashes you’re out of sync […]

Read more

How Web Services world affect LAMP Stack

In connection to my previous post I was thinking how Web 2.0 with its massive use of Web Services affect LAMP Stack ? Well actually there are serious difference both for client and server application development which you might want to take into account.
If you’re developing Web Service Server application you will most likely […]

Read more

Subscribe to the Percona Database Performance Blog for open source database help, technical resources, Percona Live updates and upcoming webinars.

Submit your email address below and we’ll send you an update every Friday at 1pm ET.

No, thank you. Please do not ask me again.