<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: How much memory Innodb locks really take ?</title>
	<atom:link href="http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/</link>
	<description>Everything about MySQL Performance</description>
	<lastBuildDate>Sat, 07 Nov 2009 18:35:44 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dimitriy A</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-620338</link>
		<dc:creator>Dimitriy A</dc:creator>
		<pubDate>Wed, 29 Jul 2009 23:38:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-620338</guid>
		<description>Thanks Foobarista and Peter. I do realize that the buffer pool is small for the new functionality we will be adding to production to keep it trimmed. What I am saying is that it seems to me that the locks are taking up more memory then what Peter has proposed. My goal was also to see how much memory the locks take up. As the delete is running in our development environment, I see that the number of lock structures and heap size is growing as time passes. If Peter has looked at InnoDB status file before the heap size and lock structures reached a peak during the query run, than maybe he is getting incorrect results. Or maybe I am all wrong and need to be pointed in the right direction.</description>
		<content:encoded><![CDATA[<p>Thanks Foobarista and Peter. I do realize that the buffer pool is small for the new functionality we will be adding to production to keep it trimmed. What I am saying is that it seems to me that the locks are taking up more memory then what Peter has proposed. My goal was also to see how much memory the locks take up. As the delete is running in our development environment, I see that the number of lock structures and heap size is growing as time passes. If Peter has looked at InnoDB status file before the heap size and lock structures reached a peak during the query run, than maybe he is getting incorrect results. Or maybe I am all wrong and need to be pointed in the right direction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Foobarista</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-618509</link>
		<dc:creator>Foobarista</dc:creator>
		<pubDate>Mon, 27 Jul 2009 20:46:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-618509</guid>
		<description>Dimitriy: we&#039;ve been playing a lot with DELETE and if your delete doesn&#039;t use an index, InnoDB will put an X lock on every row in the table, so make sure your query uses an index if one is convenient.  (Note that we found that MySQL doesn&#039;t do a great job with indexing DELETEs that use a subquery against another table in the WHERE - you should replace it with a DELETE using a FROM and explicit join so it plans index use more predictably.)  Also, I think (although I&#039;m not sure) that pages with locked rows stay pinned in memory.  In any case, you probably should bump up the buffer to something a whole lot bigger as the &quot;buffer pool&quot; is both cached pages and active lock tables.</description>
		<content:encoded><![CDATA[<p>Dimitriy: we&#8217;ve been playing a lot with DELETE and if your delete doesn&#8217;t use an index, InnoDB will put an X lock on every row in the table, so make sure your query uses an index if one is convenient.  (Note that we found that MySQL doesn&#8217;t do a great job with indexing DELETEs that use a subquery against another table in the WHERE &#8211; you should replace it with a DELETE using a FROM and explicit join so it plans index use more predictably.)  Also, I think (although I&#8217;m not sure) that pages with locked rows stay pinned in memory.  In any case, you probably should bump up the buffer to something a whole lot bigger as the &#8220;buffer pool&#8221; is both cached pages and active lock tables.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-592927</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Tue, 23 Jun 2009 00:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-592927</guid>
		<description>Dmitry,

The number given are for large numbers.  10MB buffer pool is not something which is usable in production for anything significant.</description>
		<content:encoded><![CDATA[<p>Dmitry,</p>
<p>The number given are for large numbers.  10MB buffer pool is not something which is usable in production for anything significant.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dimitriy A</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-592882</link>
		<dc:creator>Dimitriy A</dc:creator>
		<pubDate>Tue, 23 Jun 2009 00:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-592882</guid>
		<description>We have a table that contains 4 months of data. The requirement is to keep 3 months of data and delete the rest. With under 4 million rows in the table, 760,000 are matched by the where clause in delete statement. I tried to calculate how much space would be used up by the locks given that less than 4 bits per locked row will be used. 760000 * 4 / 8 = 380000. This is about 380 KB. With the InnoDB buffer pool set to 10 MB, I still get the error: &quot;The total number of locks exceeds the lock table size&quot;. With no other activity on the database, this seems like the requirement is higher. Does the size of the row has anything to do with this? We do store large blobs in the table.</description>
		<content:encoded><![CDATA[<p>We have a table that contains 4 months of data. The requirement is to keep 3 months of data and delete the rest. With under 4 million rows in the table, 760,000 are matched by the where clause in delete statement. I tried to calculate how much space would be used up by the locks given that less than 4 bits per locked row will be used. 760000 * 4 / 8 = 380000. This is about 380 KB. With the InnoDB buffer pool set to 10 MB, I still get the error: &#8220;The total number of locks exceeds the lock table size&#8221;. With no other activity on the database, this seems like the requirement is higher. Does the size of the row has anything to do with this? We do store large blobs in the table.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Como resolver o problema do MySQL Error 1206</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-310442</link>
		<dc:creator>Como resolver o problema do MySQL Error 1206</dc:creator>
		<pubDate>Sun, 08 Jun 2008 06:06:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-310442</guid>
		<description>[...] artigo no MySQL Performance Blog (que eu assino o feed) também explica como ocorre o lock em tabelas innodb: in Innodb row level locks are implemented by having special lock table, located in the buffer pool [...]</description>
		<content:encoded><![CDATA[<p>[...] artigo no MySQL Performance Blog (que eu assino o feed) também explica como ocorre o lock em tabelas innodb: in Innodb row level locks are implemented by having special lock table, located in the buffer pool [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Error 1206 &#171; Mike R&#8217;s Blog</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-5348</link>
		<dc:creator>MySQL Error 1206 &#171; Mike R&#8217;s Blog</dc:creator>
		<pubDate>Mon, 23 Oct 2006 20:32:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-5348</guid>
		<description>[...] Update (23-Oct-2006) Found what I was looking for about the InnoDB lock table and it&#8217;s behavior at MySQL Performance Blog. Update (21-Oct-2006) Found an explanation here which says: &#8220;The SQL statement sets locks on all the records it scans. If you have a small buffer pool, then the InnoDB lock table may indeed grow so big that it does not fit in the buffer pool. &#8220; [...]</description>
		<content:encoded><![CDATA[<p>[...] Update (23-Oct-2006) Found what I was looking for about the InnoDB lock table and it&#8217;s behavior at MySQL Performance Blog. Update (21-Oct-2006) Found an explanation here which says: &#8220;The SQL statement sets locks on all the records it scans. If you have a small buffer pool, then the InnoDB lock table may indeed grow so big that it does not fit in the buffer pool. &#8220; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: MySQL Performance Blog &#187; SELECT LOCK IN SHARE MODE and FOR UPDATE</title>
		<link>http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/comment-page-1/#comment-1541</link>
		<dc:creator>MySQL Performance Blog &#187; SELECT LOCK IN SHARE MODE and FOR UPDATE</dc:creator>
		<pubDate>Sun, 06 Aug 2006 20:56:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.mysqlperformanceblog.com/2006/07/13/how-much-memory-innodb-locks-really-take/#comment-1541</guid>
		<description>[...] Lock table Innodb can lock tables but it will still need to set row level locks which is memory and CPU overhead. For some bulk operations it would be more efficient to use table locks. As I  tested it really takes some resources. [...]</description>
		<content:encoded><![CDATA[<p>[...] Lock table Innodb can lock tables but it will still need to set row level locks which is memory and CPU overhead. For some bulk operations it would be more efficient to use table locks. As I  tested it really takes some resources. [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
