<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>MySQL Preacher &#187; information_schema</title>
	<atom:link href="http://mysqlpreacher.com/wordpress/tag/information_schema/feed/" rel="self" type="application/rss+xml" />
	<link>http://mysqlpreacher.com/wordpress</link>
	<description>A MySQL blog, from a MySQL DBA</description>
	<lastBuildDate>Wed, 16 Jun 2010 13:13:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Table Sizes</title>
		<link>http://mysqlpreacher.com/wordpress/2008/12/table-sizes/</link>
		<comments>http://mysqlpreacher.com/wordpress/2008/12/table-sizes/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 21:02:17 +0000</pubDate>
		<dc:creator>Darren Cassar</dc:creator>
				<category><![CDATA[Beginner]]></category>
		<category><![CDATA[general information]]></category>
		<category><![CDATA[information_schema]]></category>
		<category><![CDATA[table size]]></category>

		<guid isPermaLink="false">http://mysqlpreacher.com/wordpress/?p=20</guid>
		<description><![CDATA[During the course of my daily work I occasionally search for mysql queries which are cool and helpful. I once found the following query on http://forge.mysql.com/:
SELECT table_name article_attachment,
engine,
ROUND(data_length/1024/1024,2) total_size_mb,
ROUND(index_length/1024/1024,2) total_index_size_mb,
table_rows
FROM information_schema.tables
WHERE table_schema = &#8216;dbname&#8217;
ORDER BY 3 desc;
A generally  lite version is:
select table_schema, table_name, (data_length)/pow(1024,2) AS &#8216;Data Size in Meg&#8217;, (index_length)/pow(1024,2) AS &#8216;Index Size in Meg&#8217;  from tables order [...]]]></description>
			<content:encoded><![CDATA[<p>During the course of my daily work I occasionally search for mysql queries which are cool and helpful. I once found the following query on http://forge.mysql.com/:</p>
<p>SELECT table_name article_attachment,<br />
engine,<br />
ROUND(data_length/1024/1024,2) total_size_mb,<br />
ROUND(index_length/1024/1024,2) total_index_size_mb,<br />
table_rows<br />
FROM information_schema.tables<br />
WHERE table_schema = &#8216;dbname&#8217;<br />
ORDER BY 3 desc;</p>
<p>A generally  lite version is:</p>
<p>select table_schema, table_name, (data_length)/pow(1024,2) AS &#8216;Data Size in Meg&#8217;, (index_length)/pow(1024,2) AS &#8216;Index Size in Meg&#8217;  from tables order by 3 desc;</p>
<p>You can add or remove columns etc and but this query shows the table size (data wise) index size, approx number of rows, size in MB etc. If you would like to know what else is available to add to this query, just do a &#8220;desc tables&#8221; while using the informations chema (database).</p>
]]></content:encoded>
			<wfw:commentRss>http://mysqlpreacher.com/wordpress/2008/12/table-sizes/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
