<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.12-alpha" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: MariaDB 5.1 feature: Table Elimination</title>
	<link>http://s.petrunia.net/blog/?p=58</link>
	<description>Random observations made while working on MySQL / MariaDB query optimizer</description>
	<pubDate>Sat, 04 Sep 2010 18:34:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.12-alpha</generator>

	<item>
		<title>by: spetrunia</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68982</link>
		<pubDate>Mon, 15 Feb 2010 22:02:39 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68982</guid>
					<description>Hi Andreas, 

Yes I remember our talk. Thanks for the the link and the performance test. One problem that I have with such testing is that the speedup number is somewhat arbitrary: one could make the eliminated table bigger by putting bigger TEXT data into it, and/or one could use an example where join removal would remove multiple tables. 

I would argue that your example shows least possible speedup as the example removes only one table with relatively small columns :-)</description>
		<content:encoded><![CDATA[<p>Hi Andreas, </p>
<p>Yes I remember our talk. Thanks for the the link and the performance test. One problem that I have with such testing is that the speedup number is somewhat arbitrary: one could make the eliminated table bigger by putting bigger TEXT data into it, and/or one could use an example where join removal would remove multiple tables. </p>
<p>I would argue that your example shows least possible speedup as the example removes only one table with relatively small columns <img src='http://s.petrunia.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: akretschmer</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68981</link>
		<pubDate>Wed, 10 Feb 2010 08:06:48 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68981</guid>
					<description>Hi,

Maybe you remeber me, we talked about this feature after your presentation at FOSDEM.

Inspired by your presentation i have made a test with PostgreSQL. Our upcoming release 9.0 contains a similar feature, we called it join removal (as Stefan Kaltenbrunner said).

http://akretschmer.blogspot.com/2010/02/join-removal-short-performance-test.html</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Maybe you remeber me, we talked about this feature after your presentation at FOSDEM.</p>
<p>Inspired by your presentation i have made a test with PostgreSQL. Our upcoming release 9.0 contains a similar feature, we called it join removal (as Stefan Kaltenbrunner said).</p>
<p><a href="http://akretschmer.blogspot.com/2010/02/join-removal-short-performance-test.html" rel="nofollow">http://akretschmer.blogspot.com/2010/02/join-removal-short-performance-test.html</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: sergey</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68961</link>
		<pubDate>Mon, 02 Nov 2009 20:34:24 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68961</guid>
					<description>Stefan,

Thanks for the pointer. It would be interesting to compare the features.</description>
		<content:encoded><![CDATA[<p>Stefan,</p>
<p>Thanks for the pointer. It would be interesting to compare the features.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: sergey</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68960</link>
		<pubDate>Mon, 02 Nov 2009 20:33:33 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68960</guid>
					<description>Jonas, 

The SQL layer will not touch any records in eliminated tables, so no locks will
be placed on any records from eliminated tables.

With regards to correctness of this, first I doubt that there is a clear
definition of what should happen with SELECT ... FOR UPDATE with outer joins
(PostgreSQL would give error when one attempts to do this IIRC).  

If we stretch the FOR UPDATE definition to cover outer joins, then I still
think current behavior is correct: one of the necessary conditions to
eliminate a table is that it must not be referred from the select list. I
interpret it as that we selected nothing from the eliminated table and hence
don't need to place any locks.

SELECT .. FOR UPDATE won't place any locks for tables inside subqueries, 
including FROM-subqueries, why inner sides of outer joins that don't get 
to select list should be any better?</description>
		<content:encoded><![CDATA[<p>Jonas, </p>
<p>The SQL layer will not touch any records in eliminated tables, so no locks will<br />
be placed on any records from eliminated tables.</p>
<p>With regards to correctness of this, first I doubt that there is a clear<br />
definition of what should happen with SELECT &#8230; FOR UPDATE with outer joins<br />
(PostgreSQL would give error when one attempts to do this IIRC).  </p>
<p>If we stretch the FOR UPDATE definition to cover outer joins, then I still<br />
think current behavior is correct: one of the necessary conditions to<br />
eliminate a table is that it must not be referred from the select list. I<br />
interpret it as that we selected nothing from the eliminated table and hence<br />
don&#8217;t need to place any locks.</p>
<p>SELECT .. FOR UPDATE won&#8217;t place any locks for tables inside subqueries,<br />
including FROM-subqueries, why inner sides of outer joins that don&#8217;t get<br />
to select list should be any better?
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Stefan Kaltenbrunner</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68959</link>
		<pubDate>Mon, 02 Nov 2009 17:22:51 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68959</guid>
					<description>Nice optimizer improvement - fwiw PostgreSQL 8.5alpha2 contains a very similiar planner improvement called "join removal" in the release notes:

http://developer.postgresql.org/pgdocs/postgres/release-8-5.html</description>
		<content:encoded><![CDATA[<p>Nice optimizer improvement - fwiw PostgreSQL 8.5alpha2 contains a very similiar planner improvement called &#8220;join removal&#8221; in the release notes:</p>
<p><a href="http://developer.postgresql.org/pgdocs/postgres/release-8-5.html" rel="nofollow">http://developer.postgresql.org/pgdocs/postgres/release-8-5.html</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Jonas</title>
		<link>http://s.petrunia.net/blog/?p=58#comment-68952</link>
		<pubDate>Mon, 02 Nov 2009 13:41:45 +0000</pubDate>
		<guid>http://s.petrunia.net/blog/?p=58#comment-68952</guid>
					<description>How did you reason about the implications for "select for update" ?</description>
		<content:encoded><![CDATA[<p>How did you reason about the implications for &#8220;select for update&#8221; ?
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
