<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Prodromus</title>
	
	<link>http://www.prodromus.com</link>
	<description>A forerunner to the future...</description>
	<lastBuildDate>Tue, 07 Sep 2010 19:11:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/Prodromus" /><feedburner:info uri="prodromus" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>MySQL – Help, I lost the Root password!  Error number 1045</title>
		<link>http://www.prodromus.com/2010/09/07/mysql-help-i-lost-the-root-password-error-number-1045</link>
		<comments>http://www.prodromus.com/2010/09/07/mysql-help-i-lost-the-root-password-error-number-1045#comments</comments>
		<pubDate>Tue, 07 Sep 2010 19:11:13 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[Errors]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[FLUSH]]></category>
		<category><![CDATA[mysql error number 1045]]></category>
		<category><![CDATA[mysql server]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[PRIVILEGES]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[root password]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=347</guid>
		<description><![CDATA[Have you ever seen the dreaded MySQL Error number 1045 Access denied for user &#8216;root&#8217;@'localhost&#8217; (using password: YES)? Don&#8217;t worry, this is an easy to recover from situation. Just follow these basic steps to reset the root user password. Stop the MySQL server process. Start the MySQL server process with the &#8211;skip-grant-tables option. This option [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever seen the dreaded MySQL Error number 1045 Access denied for user &#8216;root&#8217;@'localhost&#8217; (using password: YES)?</p>
<p>Don&#8217;t worry, this is an easy to recover from situation.  Just follow these basic steps to reset the root user password.</p>
<p>Stop the MySQL server process.</p>
<p>Start the MySQL server process with the &#8211;skip-grant-tables option.  This option causes the server to start without using the privilege system at all, which gives <strong>anyone </strong>with access to the server unrestricted access to all databases. BEWARE!  Anyone can access your server, so make sure off the Internet, and that you perform the following steps as quickly as possible.</p>
<p>Start the MySQL console client with the -u root option.  Mysql -u root</p>
<p>SELECT * FROM mysql.user;</p>
<p>UPDATE mysql.user SET Password=PASSWORD(&#8216;[password]&#8216;) WHERE User=&#8217;[username]&#8216;;  Replace [username] with root to change root.  You can also change any other user as well.</p>
<p>Stop the MySQL process</p>
<p>Start the MySQL Process normally (i.e. without the &#8211;skip-grant-tables option).</p>
<p>Some folks have reported that issuing a Flush Privileges command will prevent your having to perform the final Stop/Start of the MySQL server.  However, this has not always worked for me, and I think to be safe, it is wise to recycle the server.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/09/07/mysql-help-i-lost-the-root-password-error-number-1045/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL – Innodb Slow Shutdown – Dirty Buffer Pages</title>
		<link>http://www.prodromus.com/2010/09/03/mysql-innodb-slow-shutdown-dirty-buffer-pages</link>
		<comments>http://www.prodromus.com/2010/09/03/mysql-innodb-slow-shutdown-dirty-buffer-pages#comments</comments>
		<pubDate>Fri, 03 Sep 2010 14:45:39 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[Innodb]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[buffer]]></category>
		<category><![CDATA[buffer pool]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Dirty]]></category>
		<category><![CDATA[dirty pages]]></category>
		<category><![CDATA[downtime]]></category>
		<category><![CDATA[long time]]></category>
		<category><![CDATA[mysql server]]></category>
		<category><![CDATA[Shutdown]]></category>
		<category><![CDATA[shutdowns]]></category>
		<category><![CDATA[slow shutdown]]></category>
		<category><![CDATA[system shutdown]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=281</guid>
		<description><![CDATA[If you have a MySQL server that reserves a large amount of memory for the Innodb buffer pool, you may have seen that it can often take a very long time to shutdown.  During the shutdown process, the server will not be able to serve any requests.  From my experience, I have seen that it [...]]]></description>
			<content:encoded><![CDATA[<p>If you have a MySQL server that reserves a large amount of memory for the Innodb buffer pool, you may have seen that it can often take a very long time to shutdown.  During the shutdown process, the server will not be able to serve any requests.  From my experience, I have seen that it can take 1-5 minutes per GB of buffer to perform a shutdown.  So, for example, if you have a server with 50G of memory allocated to the Innodb Buffer Pool, and 50% of the buffer is dirty (unwritten to disk), it can take anywhere from 25-125 minutes to shutdown.  Multiple hour shutdowns on large, busy Innodb MySQL servers is not unheard of.</p>
<p>Luckily, there is a fairly easy way to speed up shutdown while still allowing the server to stay up and handle requests.  The secret is to lower the maximum percentage of dirty pages allowed.  This is controlled by the global variable innodb_max_dirty_pages_pct.  On my servers I usually have this set at 75%.  This variable can be changed at run-time, which allows us to modify this variable to speed up system shutdown.</p>
<p>First, enter the command :</p>
<p>set global  innodb_max_dirty_pages_pct=0;</p>
<p>You can then enter the following to verify the new value:</p>
<p>show  global variables where variable_name rlike &#8216;dirty&#8217;;</p>
<p>To monitor the number of dirty pages that have not been written to disk, enter the following:</p>
<p>show  global status where variable_name rlike &#8216;dirty&#8217;;</p>
<p>You will see this number begin to drop, although it is unlikely to ever reach 0, once it drops to a low level and reaches a plateau, you can then shutdown the server.  You will find that the server will shutdown very quickly, allowing you to minimize downtime.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/09/03/mysql-innodb-slow-shutdown-dirty-buffer-pages/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Collate and Case Sensitivity – Flexible Compare</title>
		<link>http://www.prodromus.com/2010/08/31/mysql-collate-and-case-sensitivity-flexible-compare</link>
		<comments>http://www.prodromus.com/2010/08/31/mysql-collate-and-case-sensitivity-flexible-compare#comments</comments>
		<pubDate>Tue, 31 Aug 2010 17:10:50 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[case sensitivity]]></category>
		<category><![CDATA[case-sensitive search]]></category>
		<category><![CDATA[COLLATE]]></category>
		<category><![CDATA[collation]]></category>
		<category><![CDATA[match]]></category>
		<category><![CDATA[sensitive search]]></category>
		<category><![CDATA[string comparisons]]></category>
		<category><![CDATA[string search]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=340</guid>
		<description><![CDATA[In a typical MySQL installation, the default character set and collation are latin1 and latin1_swedish_ci.  This means that all string comparisons will be performed in a case insensitive manner.  So, &#8216;Search String&#8217;='search string&#8217;.  This is great for most WHERE expressions, however there are occasions where performing a case-sensitive search is required.  Luckily MySQL provides the collate clause which allows you to [...]]]></description>
			<content:encoded><![CDATA[<p><!--e9e379b0972f40d19a4f98f80fa4ffb2-->In a typical MySQL installation, the default character set and collation are latin1 and latin1_swedish_ci.  This means that all string comparisons will be performed in a case insensitive manner.  So, &#8216;Search String&#8217;='search string&#8217;.  This is great for most WHERE expressions, however there are occasions where performing a case-sensitive search is required.  Luckily MySQL provides the collate clause which allows you to override whatever the default collation is for a comparison.   As an example :</p>
<p>select * from mytable where first_name collate latin1_general_cs=&#8217;damon&#8217;</p>
<p>This will only return rows will the first_name matches damon exactly.  Damon will not match.</p>
<p>You can also use latin1_bin which performs an exact binary match.</p>
<p>If you are unsure of a field or strings collation, you can use the COLLATION(str) function to return the collation of the string argument.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/31/mysql-collate-and-case-sensitivity-flexible-compare/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top My.CNF Optimizations for Innodb</title>
		<link>http://www.prodromus.com/2010/08/20/top-my-cnf-optimizations-for-innodb</link>
		<comments>http://www.prodromus.com/2010/08/20/top-my-cnf-optimizations-for-innodb#comments</comments>
		<pubDate>Fri, 20 Aug 2010 16:07:18 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[Innodb]]></category>
		<category><![CDATA[MyISAM]]></category>
		<category><![CDATA[optimizations]]></category>
		<category><![CDATA[performance improvement]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[query performance]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=327</guid>
		<description><![CDATA[These are the four parameters which will have the most affect on the performance of MySQL 5.1x and Innodb.   If you are suffering from poor performance, try changing the following settings.  Remember, each individual situation will vary, and in many cases, the actual design of your queries will have more to do with your [...]]]></description>
			<content:encoded><![CDATA[<p>These are the four parameters which will have the most affect on the performance of MySQL 5.1x and Innodb.   If you are suffering from poor performance, try changing the following settings.  Remember, each individual situation will vary, and in many cases, the actual design of your queries will have more to do with your overall performance than any system tuning tricks.  The best tool I have found to capture, review, and analyse query performance for MySQL is <a title="Jet Profiler for MySQL" href="http://www.jetprofiler.com/" target="_blank">Jet Profiler for MySQL</a>.  If you need help optimizing your queries, let us know.</p>
<div id="_mcePaste">
<p><span style="font-size: 13.3333px;">innodb_buffer_pool_size =8G<br />
</span><span style="font-size: 13.3333px;">Set this to ~80% of free server memory.  If you have a dedicated MySQL server with 10G, set to 8G</span></p>
</div>
<div id="_mcePaste"><span style="font-size: 13.3333px;">innodb_flush_log_at_trx_commit =0 </span></div>
<div><span style="font-size: 13.3333px;">Setting this to 0 will have a huge performance improvement, however your data is at somewhat more if you have a hardware failure</span></div>
<div><span style="font-size: 13.3333px;"><br />
</span></div>
<div id="_mcePaste">sync_binlog =0<br />
<span style="font-size: 13.3333px;">Setting this to 0 will have a huge performance improvement, however your data is at somewhat more if you have a hardware failure</span></div>
<div><span style="font-size: 13.3333px;"><br />
</span></div>
<div id="_mcePaste">innodb_flush_method=O_DIRECT<br />
On many systems, this will provide a performance improvement.  However, this can actually have a negative affect, so make sure you test appropriately.</div>
<h6 class="zemanta-related-title" style="font-size: 1em;">Related articles</h6>
<ul class="zemanta-article-ul">
<li class="zemanta-article-ul-li"><a href="http://www.prodromus.com/2010/06/02/mysql-disabling-binary-logging-for-insert-and-update">MySQL &#8211; Disabling Binary Logging for INSERT and UPDATE</a> (prodromus.com)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/20/top-my-cnf-optimizations-for-innodb/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL- Allowing Access to Root Remotely</title>
		<link>http://www.prodromus.com/2010/08/19/mysql-allowing-access-to-root-remotely</link>
		<comments>http://www.prodromus.com/2010/08/19/mysql-allowing-access-to-root-remotely#comments</comments>
		<pubDate>Thu, 19 Aug 2010 18:08:19 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[FLUSH]]></category>
		<category><![CDATA[GRANT ALL]]></category>
		<category><![CDATA[GRANT ALL PRIVILEGES ON]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[PRIVILEGES]]></category>
		<category><![CDATA[proper syntax]]></category>
		<category><![CDATA[Remote access]]></category>
		<category><![CDATA[Remotely]]></category>
		<category><![CDATA[skip-networking]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=322</guid>
		<description><![CDATA[MySQL includes all the basic methods needed to secure your user accounts.  However, the syntax and style used to manage it is often confusing to MySQL novices.  Here are a couple tips to get you started, however I strongly suggest your read the MySQL User Account Management documentation. If you need to change your password [...]]]></description>
			<content:encoded><![CDATA[<p><a class="zem_slink" title="MySQL" rel="homepage" href="http://www.mysql.com">MySQL</a> includes all the basic methods needed to secure your user accounts.  However, the syntax and style used to manage it is often confusing to MySQL novices.  Here are a couple tips to get you started, however I strongly suggest your read the <a title="MySQL User Account Management" href="http://dev.mysql.com/doc/refman/5.1/en/user-account-management.html" target="_blank">MySQL User Account Management documentation</a>.</p>
<p>If you need to change your password for your localhost root account, here is the proper syntax.</p>
<p><code>mysql -u root<br />mysql&gt; SET PASSWORD FOR 'ROOT'@'LOCALHOST' = PASSWORD('new_password');</code></p>
<p>You can also grant access to all remote servers as well by using the following syntax.</p>
<p><code>mysql&gt; GRANT ALL PRIVILEGES ON *.* TO 'root'@'%' IDENTIFIED BY 'password' WITH GRANT OPTION;<br />mysql&gt; FLUSH PRIVILEGES;<br /></code></p>
<p>By default, MySQL only allows access by the ‘root’ account from the host running the database server (‘localhost’).</p>
<p>The percent symbol (<code>"%"</code>) in the notation <code>root@"%"</code> means “any host”, but it doesn’t imply localhost. You need to repeat the commands above with <code>root@localhost</code> in order to grant/revoke permissions for localhost.</p>
<p>If you are setting up your server and require NO remote access, add skip-networking to your my.cnf file.</p>
<p>skip-networking : Don’t listen for TCP/IP connections at all. All interaction with mysqld must be made via Unix sockets. This option is highly recommended for systems where only local requests are allowed. Since you need to allow remote connection this line should be removed from my.cnf or put it in comment state.</p>
<p> </p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: medium none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=f09a4588-6ab3-4b2e-b020-bd003de39078" alt="" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/19/mysql-allowing-access-to-root-remotely/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL Delimiters – Or why I hate stored procedures and Error Code : 1064 You have an error in your SQL syntax.</title>
		<link>http://www.prodromus.com/2010/08/19/316</link>
		<comments>http://www.prodromus.com/2010/08/19/316#comments</comments>
		<pubDate>Thu, 19 Aug 2010 17:29:01 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Colon]]></category>
		<category><![CDATA[database engine]]></category>
		<category><![CDATA[DBA]]></category>
		<category><![CDATA[delimiter]]></category>
		<category><![CDATA[Error Code : 1064]]></category>
		<category><![CDATA[escape]]></category>
		<category><![CDATA[mysql command line]]></category>
		<category><![CDATA[Pattern matching]]></category>
		<category><![CDATA[procedure]]></category>
		<category><![CDATA[procedure body]]></category>
		<category><![CDATA[sql syntax]]></category>
		<category><![CDATA[Stored procedure]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=316</guid>
		<description><![CDATA[MySQL 5.0+ gave DBA&#8217;s the ability to write stored procedures and functions. This is a great addition, and one that all &#8220;real&#8221; DB engines should provide. But, as many DBA have found out, writing stored procedures using most MySQL clients can be a bit of a challenge. Usually after writing their first attempt, they are [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL 5.0+ gave DBA&#8217;s the ability to write stored procedures and functions.  This is a great addition, and one that all &#8220;real&#8221; DB engines should provide.  But, as many DBA have found out, writing stored procedures using most MySQL clients can be a bit of a challenge.  Usually after writing their first attempt, they are greeted with, &#8220;Error Code : 1064 You have have an error in your SQL syntax;&#8221;.</p>
<p>So, what is going on?   Well, by default the MySQL statement delimiter is the semi-colon (;).   However, the mysql command-line utility also uses a semi-colon as a delimiter.  So, if the command-line utility were to interpret the ; characters inside of the stored procedure itself, those would not end up becoming part of the stored procedure, and that would make the SQL in the stored procedure syntactically invalid.</p>
<p>The solution is to temporarily change the command-line utility delimiter using the DELIMITER command, as seen here:</p>
<p>DELIMITER //</p>
<p>CREATE PROCEDURE sku_pricing(    OUT low_price DECIMAL(8,2),    OUT high_price DECIMAL(8,2),    OUT avg_price DECIMAL(8,2) )</p>
<p>BEGIN</p>
<p style="padding-left: 30px;">SELECT Min(prod_price)    INTO low_price    FROM sku_items;</p>
<p style="padding-left: 30px;">SELECT Max(prod_price)    INTO high_price    FROM items;</p>
<p style="padding-left: 30px;">SELECT Avg(prod_price)    INTO avg_price    FROM items;</p>
<p>END; //</p>
<p>DELIMITER ;</p>
<p>Here, DELIMITER // tells the command-line utility to use // as the new end of statement delimiter, and you will notice that the END that closes the stored procedure is defined as END // instead of the expected END;. This way the ; within the stored procedure body remains intact and is correctly passed to the database engine, rather than being interpreted by the client.  And then, to restore things back to how they were initially, the statement closes with a DELIMITER ;.    Any character may be used as the delimiter except for \, as it is an escape character in mySQL.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/19/316/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How do I store an IP Address in MySQL?  INET_AtoN!</title>
		<link>http://www.prodromus.com/2010/08/19/how-do-i-store-an-ip-address-in-mysql-inet_aton</link>
		<comments>http://www.prodromus.com/2010/08/19/how-do-i-store-an-ip-address-in-mysql-inet_aton#comments</comments>
		<pubDate>Thu, 19 Aug 2010 14:55:14 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[ATON]]></category>
		<category><![CDATA[inet]]></category>
		<category><![CDATA[inet_aton]]></category>
		<category><![CDATA[inet_ntoa]]></category>
		<category><![CDATA[integer]]></category>
		<category><![CDATA[ip address]]></category>
		<category><![CDATA[reverse]]></category>
		<category><![CDATA[UNSIGNED]]></category>
		<category><![CDATA[unsigned integer]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=312</guid>
		<description><![CDATA[One of the most popular questions out there is, &#8220;How do I store an IP Address in MySQL?&#8221;.   The fastest and most compact way to store an IP address in the format &#8220;10.51.1.10&#8243; is as an unsigned integer.  If you store the actual values as a char(15), you will require 11 extra bytes per [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most popular questions out there is, &#8220;How do I store an IP Address in MySQL?&#8221;.   The fastest and most compact way to store an IP address in the format &#8220;10.51.1.10&#8243; is as an unsigned integer.  If you store the actual values as a char(15), you will require 11 extra bytes per row.  In addition, using IP as a condition when querying is much faster when using an unsigned integer.  Testing has shown that range queries can result in as much as a 35 million times improvement over storing an IP address as a character string.  Yes, that is 35 million!</p>
<p>Simply define IP as an INT UNSIGNED.</p>
<p>Use MySQL&#8217;s built-in function INET_ATON() to convert the string representation of the IP Address into an unsigned Integer.  INET_NTOA() will perform the reverse translation.</p>
<p>This will result in space savings, and faster queries, who could ask for more than that?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/19/how-do-i-store-an-ip-address-in-mysql-inet_aton/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Show Processlist and Show Full Processlist – MySQL Tip</title>
		<link>http://www.prodromus.com/2010/08/19/show-processlist-and-show-full-processlist-mysql-tip</link>
		<comments>http://www.prodromus.com/2010/08/19/show-processlist-and-show-full-processlist-mysql-tip#comments</comments>
		<pubDate>Thu, 19 Aug 2010 14:33:52 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Connect]]></category>
		<category><![CDATA[info column]]></category>
		<category><![CDATA[Processlist]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=307</guid>
		<description><![CDATA[Everyone knows that using the MySQL command Show Processlist will display all current connections, like the following : mysql&#62; show processlist; show processlist; +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ &#124; Id &#124; User &#124; Host &#124; db &#124; Command &#124; Time &#124; State &#124; Info &#124; +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+ &#124; 1 &#124; root &#124; localhost:32893 &#124; NULL &#124; Sleep &#124; 0 &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone knows that using the MySQL command Show Processlist will display all current connections, like the following :</p>
<p>mysql&gt; show processlist;<br /> show processlist;<br /> +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br /> | Id | User        | Host            | db   | Command | Time | State                            | Info             |<br /> +&#8212;-+&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br /> |  1 | root        | localhost:32893 | NULL | Sleep   |    0 |                                  | NULL             |<br /> |  5 | system user |                 | NULL | Connect |   98 | Waiting for master to send event | NULL             |<br /> |  6 | system user |                 | NULL | Connect | 5018 | Reading event from the relay log | NULL             |<br /> +&#8212;&#8211;+&#8212;&#8212;+&#8212;&#8212;&#8212;&#8211;+&#8212;&#8212;&#8212;+&#8212;&#8212;&#8212;+&#8212;&#8212;-+&#8212;&#8212;-+&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;+<br /> 3 rows in set (0.00 sec)</p>
<p>What is little known however is that the Show Full Processlist command will display the full query in the Info column.   By default, Show Processlist will only display the first 100 characters.  One thing to keep in mind about the Info line is that while the statement (query) might be the one sent to the server, it will display the innermost statement if the statement executes other statements.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/19/show-processlist-and-show-full-processlist-mysql-tip/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to increase MySQL performance when loading a Dump File</title>
		<link>http://www.prodromus.com/2010/08/19/how-to-increase-mysql-performance-when-loading-a-dump</link>
		<comments>http://www.prodromus.com/2010/08/19/how-to-increase-mysql-performance-when-loading-a-dump#comments</comments>
		<pubDate>Thu, 19 Aug 2010 13:28:55 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Restore Backup]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[COMMIT]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database engines]]></category>
		<category><![CDATA[Dump]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=303</guid>
		<description><![CDATA[In MYSQL, as well as most database engines, restoring a backup, or importing from an existing dump file can take a long time depending on the number of indexes and primary keys you have on each table. You can speed this process up dramatically by modifying your original dump file by surrounding it with the [...]]]></description>
			<content:encoded><![CDATA[<p>In MYSQL, as well as most database engines, restoring a backup, or importing from an existing dump file can take a long time depending on the number of indexes and primary keys you have on each table.  You can speed this process up dramatically by modifying your original dump file by surrounding it with the following:</p>
<p>SET AUTOCOMMIT = 0;<br />
SET FOREIGN_KEY_CHECKS=0;</p>
<p>.. your dump file ..</p>
<p>SET FOREIGN_KEY_CHECKS = 1;<br />
COMMIT;<br />
SET AUTOCOMMIT = 1;</p>
<p>This will force MySQL to not commit until all rows have been loaded, as well as skip all foreign keys checks.  Only skip these checks if you are 100% sure that no constraint is violated.  This will usually be the case when dumping from one table and inserting into another.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/08/19/how-to-increase-mysql-performance-when-loading-a-dump/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MySQL – Should you put an index on a Boolean field to help query performance?</title>
		<link>http://www.prodromus.com/2010/06/14/mysql-should-you-put-an-index-on-a-boolean-field-to-help-query-performance</link>
		<comments>http://www.prodromus.com/2010/06/14/mysql-should-you-put-an-index-on-a-boolean-field-to-help-query-performance#comments</comments>
		<pubDate>Mon, 14 Jun 2010 13:58:23 +0000</pubDate>
		<dc:creator>Prodromus</dc:creator>
				<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Query Optimization]]></category>
		<category><![CDATA[Boolean]]></category>
		<category><![CDATA[cardinality]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[Indexing]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[query]]></category>
		<category><![CDATA[trade-off]]></category>

		<guid isPermaLink="false">http://www.prodromus.com/?p=288</guid>
		<description><![CDATA[I am often asked if it makes sense to place an index on a Boolean field in order to improve query performance.  In general, because a boolean value can only have three values (True, False, Null), this low cardinality would suggest that adding an index will not help performance, as the query optimizer will still [...]]]></description>
			<content:encoded><![CDATA[<p>I am often asked if it makes sense to place an index on a Boolean field in order to improve query performance.  In general, because a boolean value can only have three values (True, False, Null), this low cardinality would suggest that adding an index will not help performance, as the query optimizer will still usually perform a table-scan if you have an even distribution of values within your DB.</p>
<p>One situation in which an index on a boolean field (or other low cardinality field) might be useful is if there are relatively few of one of the values, for example 5 True values in a table of millions of records and you are searching for those few values on a regular basis.</p>
<p>However, y<span style="font-size: 13.3333px;">ou might index a boolean value on a <em>combination</em> of fields. </span><span style="font-size: 13.3333px;">Indexing on a single Boolean might be pointless, because there&#8217;s only 2 (or 3) values.  However, indexing on 16 boolean values has the potential of  2^16 values.  I</span><span style="font-size: 13.3333px;">t might help to make a combined index but you should understand how the combined index can and cannot be used and be aware that the order of the columns matters. </span></p>
<p>In general, you should always profile your system to see if there are queries that are too slow and consider adding another index to handle those queries. Sometimes a single combined index can be used for multiple queries and others time you will need to make an index for each type of query. Remember that adding indexes slows down modifications to the data so it is possible to have too many indexes. There is always a  trade-off when creating multiple indexes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.prodromus.com/2010/06/14/mysql-should-you-put-an-index-on-a-boolean-field-to-help-query-performance/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
