<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Performance notes on INFORMATION_SCHEMA tables</title>
	<atom:link href="http://blog.onefreevoice.com/2008/12/01/performance-notes-on-information_schema-tables/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.onefreevoice.com/2008/12/01/performance-notes-on-information_schema-tables/</link>
	<description>A Blog About Databases and Stuff</description>
	<lastBuildDate>Thu, 02 Feb 2012 04:32:09 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Cyril Scetbon</title>
		<link>http://blog.onefreevoice.com/2008/12/01/performance-notes-on-information_schema-tables/#comment-433</link>
		<dc:creator><![CDATA[Cyril Scetbon]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 20:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.onefreevoice.com/?p=131#comment-433</guid>
		<description><![CDATA[Keep in mind that the Perl motto is usable with MySQL Databases.]]></description>
		<content:encoded><![CDATA[<p>Keep in mind that the Perl motto is usable with MySQL Databases.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gregory Haase</title>
		<link>http://blog.onefreevoice.com/2008/12/01/performance-notes-on-information_schema-tables/#comment-432</link>
		<dc:creator><![CDATA[Gregory Haase]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 19:25:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.onefreevoice.com/?p=131#comment-432</guid>
		<description><![CDATA[I guess that is learning number 3.) Don&#039;t over-complicate things.

As Giuseppe has pointed out, a simple join will suffice:

&lt;pre lang=&quot;sql&quot;&gt;
SELECT DISTINCT a.table_name
  FROM information_schema.partitions a,
       information_schema.columns b
 WHERE a.table_name = b.table_name
   AND a.table_name like &#039;%reporting&#039;
   AND a.partition_name is not null
   AND b.column_name = &#039;datestring&#039;;
.....
13 rows in set (21.80 sec)
&lt;/pre&gt;]]></description>
		<content:encoded><![CDATA[<p>I guess that is learning number 3.) Don&#8217;t over-complicate things.</p>
<p>As Giuseppe has pointed out, a simple join will suffice:</p>
<pre lang="sql">
SELECT DISTINCT a.table_name
  FROM information_schema.partitions a,
       information_schema.columns b
 WHERE a.table_name = b.table_name
   AND a.table_name like '%reporting'
   AND a.partition_name is not null
   AND b.column_name = 'datestring';
.....
13 rows in set (21.80 sec)
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Giuseppe Maxia</title>
		<link>http://blog.onefreevoice.com/2008/12/01/performance-notes-on-information_schema-tables/#comment-431</link>
		<dc:creator><![CDATA[Giuseppe Maxia]]></dc:creator>
		<pubDate>Mon, 01 Dec 2008 19:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.onefreevoice.com/?p=131#comment-431</guid>
		<description><![CDATA[Greg,
did you try with a JOIN, instead of a subquery?

SELECT DISTINCT a.table_name
FROM
    information_schema.partitions a
    INNER JOIN information_schema.COLUMNS b
    ON a.table_name = b.table_name
          AND a.table_schema = b.table_schema
WHERE
    a.partition_name IS NOT NULL
    AND a.table_name LIKE &#039;%reporting&#039;
    AND column_name = &#039;datestring&#039; ;

This should be faster.]]></description>
		<content:encoded><![CDATA[<p>Greg,<br />
did you try with a JOIN, instead of a subquery?</p>
<p>SELECT DISTINCT a.table_name<br />
FROM<br />
    information_schema.partitions a<br />
    INNER JOIN information_schema.COLUMNS b<br />
    ON a.table_name = b.table_name<br />
          AND a.table_schema = b.table_schema<br />
WHERE<br />
    a.partition_name IS NOT NULL<br />
    AND a.table_name LIKE &#8216;%reporting&#8217;<br />
    AND column_name = &#8216;datestring&#8217; ;</p>
<p>This should be faster.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

