<?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>HeatWare.net &#187; Databases</title>
	<atom:link href="http://heatware.net/category/databases/feed/" rel="self" type="application/rss+xml" />
	<link>http://heatware.net</link>
	<description>Computer tips from A to Z: Windows, Unix, Programming, QA, and more!</description>
	<lastBuildDate>Wed, 25 Jan 2012 21:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>pgAdmin &#8211; PostgreSQL GUI Management Tool</title>
		<link>http://heatware.net/free-software/pgadmin-postgresql-gui-client-tool/</link>
		<comments>http://heatware.net/free-software/pgadmin-postgresql-gui-client-tool/#comments</comments>
		<pubDate>Sat, 07 May 2011 05:31:52 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Free Software]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=58</guid>
		<description><![CDATA[If you are looking for a GUI management tool for PostgreSQL databases, look no further. pgAdmin III is a freeware utility for *nix and Windows operating systems that allows you to design and manage your databases. Using this tool, you can create, edit, delete tables and data for your databases. It supports an enormous amount [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://heatware.net/wp-content/uploads/2011/05/pgadmin3_win32.png"><img class="alignleft size-medium wp-image-760" style="margin-left: 2px; margin-right: 2px;" title="pgadmin3_win32" src="http://heatware.net/wp-content/uploads/2011/05/pgadmin3_win32-300x257.png" alt="" width="240" height="206" /></a> If you are looking for a GUI management tool for PostgreSQL databases, look no further. pgAdmin III is a freeware utility for *nix and Windows operating systems that allows you to design and manage your databases. Using this tool, you can create, edit, delete tables and data for your databases. It supports an enormous amount of advanced options that will all but eliminate the need to use any other GUI or command-line application.</p>
<p>For more information and to download pgAdmin III, click <a href="http://www.pgadmin.org/download/" target="_blank">here</a>.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/free-software/pgadmin-postgresql-gui-client-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to find (log) slow queries in PostgreSQL 8.x, 9.x</title>
		<link>http://heatware.net/databases/how-to-find-log-slow-queries-postgresql/</link>
		<comments>http://heatware.net/databases/how-to-find-log-slow-queries-postgresql/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 20:40:24 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=729</guid>
		<description><![CDATA[One of the most important factors when troubleshooting the performance of an application or website, is the performance of the database. Improper indexing or inefficient SQL queries can kill the performance of your application rendering it useless. It is amazing what a simple tweak or change to a SQL statement can do. I have seen [...]]]></description>
			<content:encoded><![CDATA[<p>One of the most important factors when troubleshooting the performance of an application or website, is the performance of the database. Improper indexing or inefficient SQL queries can kill the performance of your application rendering it useless. It is amazing what a simple tweak or change to a SQL statement can do. I have seen more than 100x performance improvements just from a one word change in a query. So how you can identify which queries are running slowly in your system? That is easy, just turn on the logging in your PostgreSQL database. This method has been tested in versions 8.3 and 8.4, but should apply to even 9.x!<br />
</p>
<h3>Enable slow query logging in PostgreSQL</h3>
<ul>
<li>Open the file <strong>postgresql.conf</strong> file in your favorite text editor.<br />
<em>Note:</em> If you are having trouble finding the file, run the command: <em>find / -name postgresql.conf</em></li>
<li>Look for the line:<br />
<code>#log_min_duration_statement = -1</code>and replace it with:<br />
<code>log_min_duration_statement = 100</code></li>
<li>Save the file and reload the PostgreSQL configuration <em> (Don&#8217;t worry, it won&#8217;t interrupt any active connections)</em><br />
<code>service postgresql reload</code></li>
<li>Go to the <em>pg_log</em> folder and open the latest log file. (i.e. /var/lib/pgsql/data/pg_log/)</li>
</ul>
<p>Setting the value to <em>100</em> will log every query that takes 100ms or longer to execute. Depending on the number of slow queries you have, this may be overwhelming, so consider increasing this value.</p>
<p>If you need some assistance in optimizing your slow queries, feel free to post them in the comments section below!</p>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/how-to-find-log-slow-queries-postgresql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to install PostgreSQL 8.4 on CentOS 5.5</title>
		<link>http://heatware.net/linux-unix/how-install-postgresql-8-4-centos-5/</link>
		<comments>http://heatware.net/linux-unix/how-install-postgresql-8-4-centos-5/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 19:33:32 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=720</guid>
		<description><![CDATA[If you have tried installing PostgreSQL database on CentOS 5.5 using yum, you will notice that you an old, outdated version! There are several ways to get the 8.4.x version of Postgres installed on this OS, but here is the quick and easy method! Installing PostgreSQL 8.4.x on CentOS 5.5 Download the PostgreSQL 8.4 repository [...]]]></description>
			<content:encoded><![CDATA[<p>If you have tried installing PostgreSQL database on CentOS 5.5 using <em>yum</em>, you will notice that you an old, outdated version! There are several ways to get the 8.4.x version of Postgres installed on this OS, but here is the quick and easy method!</p>
<h3>Installing PostgreSQL 8.4.x on CentOS 5.5</h3>
<ul>
<li>Download the PostgreSQL 8.4 repository RPM<br />
<code>wget http://yum.pgsqlrpms.org/reporpms/8.4/pgdg-centos-8.4-2.noarch.rpm</code></li>
<li>Add the repository<br />
<code>rpm -ivh pgdg-centos-8.4-2.noarch.rpm</code></li>
<li>Use <em>yum</em> to install PostgresSQL<br />
<code>yum install -y postgresql postgresql-server</code></li>
<li>Initialize the database<br />
<code>service postgresql initdb</code></li>
<li>Start the database<br />
<code>service postgresql restart</code></li>
<li>Automatically start database on boot<br />
<code>chkconfig postgresql on</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/linux-unix/how-install-postgresql-8-4-centos-5/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PostgreSQL: How to reset the pg_stat statistics tables?</title>
		<link>http://heatware.net/databases/postgresql-reset-clear-pg_stat/</link>
		<comments>http://heatware.net/databases/postgresql-reset-clear-pg_stat/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 05:04:36 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=643</guid>
		<description><![CDATA[The Postgres pg_stat tables show a variety of statistical information regarding the database. In certain situations (such as after major updates to your application), you may want to clear out the gathered statistics and start from scratch. For instance, if you recently implemented numerous SQL query and indexing optimizations, and you want to see statistical [...]]]></description>
			<content:encoded><![CDATA[<p>The Postgres pg_stat tables show a variety of statistical information regarding the database. In certain situations (such as after major updates to your application), you may want to clear out the gathered statistics and start from scratch. For instance, if you recently implemented numerous SQL query and indexing optimizations, and you want to see statistical data based on the new changes, you should first clear out the old stats. Here is how you do this:</p>
<ol>
<li>Open a connection to your database using psql or GUI tool</li>
<li>Run the command:</li>
<p><code>select pg_stat_reset();</code>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/postgresql-reset-clear-pg_stat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PostgreSQL: How to reload config settings without restarting database</title>
		<link>http://heatware.net/databases/postgresql-reload-config-without-restarting/</link>
		<comments>http://heatware.net/databases/postgresql-reload-config-without-restarting/#comments</comments>
		<pubDate>Thu, 13 Jan 2011 04:57:10 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Postgres]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=637</guid>
		<description><![CDATA[If you are making modifications to the Postgres configuration file postgresql.conf (or similar), and you want to new settings to take effect without needing to restart the entire database, there are two ways to accomplish this. Option 1: From the command-line shell su - postgres /usr/bin/pg_ctl reload Option 2: Using SQL SELECT pg_reload_conf(); Using either [...]]]></description>
			<content:encoded><![CDATA[<p>If you are making modifications to the Postgres configuration file postgresql.conf (or similar), and you want to new settings to take effect without needing to restart the entire database, there are two ways to accomplish this.</p>
<h3>Option 1: From the command-line shell</h3>
<p><code>su - postgres<br />
/usr/bin/pg_ctl reload</code></p>
<h3>Option 2: Using SQL</h3>
<p><code>SELECT pg_reload_conf();</code></p>
<p>Using either option will not interrupt any active queries or connections to the database, thus applying these changes seemlessly.</p>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/postgresql-reload-config-without-restarting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to view table/row locks in Postgres?</title>
		<link>http://heatware.net/databases/how-view-see-table-row-locks-postgres/</link>
		<comments>http://heatware.net/databases/how-view-see-table-row-locks-postgres/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:32:33 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=629</guid>
		<description><![CDATA[This article will show you how to see a list view a list of locks that are currently open (or waiting) on your database rows and tables. This information is beneficial when debugging timing-related errors and data inconsistencies. Login to the PostgresSQL command-line interface psql -U [username] [database_name] Run the following query: select t.relname,l.locktype,page,virtualtransaction,pid,mode,granted from [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to see a list view a list of locks that are currently open (or waiting) on your database rows and tables. This information is beneficial when debugging timing-related errors and data inconsistencies.</p>
<ol>
<li>Login to the PostgresSQL command-line interface</li>
<p><code>psql -U [username] [database_name]</code></p>
<li>Run the following query:</li>
<p><code>select t.relname,l.locktype,page,virtualtransaction,pid,mode,granted from pg_locks l, pg_stat_all_tables t where l.relation=t.relid order by relation asc;<br />
</code>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/how-view-see-table-row-locks-postgres/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to see active SQL queries and open connections in Postgres?</title>
		<link>http://heatware.net/databases/how-active-sql-queries-open-connections-postgres/</link>
		<comments>http://heatware.net/databases/how-active-sql-queries-open-connections-postgres/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:28:05 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=625</guid>
		<description><![CDATA[This article will show you how to see a list of open database connections as well as all active queries that are running on a PostgresSQL 8.x database. This information can be very beneficial when profiling your application and determining queries that have &#8220;gone wild&#8221; and are eating CPU cycles. Login to the PostgresSQL command-line [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to see a list of open database connections as well as all active queries that are running on a PostgresSQL 8.x database. This information can be very beneficial when profiling your application and determining queries that have &#8220;gone wild&#8221; and are eating CPU cycles.</p>
<ol>
<li>Login to the PostgresSQL command-line interface</li>
<p><code>psql -U [username] [database_name]</code></p>
<li>Run the following query:</li>
<p><code>SELECT datname,usename,procpid,client_addr,waiting,query_start,current_query FROM pg_stat_activity;<br />
</code>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/how-active-sql-queries-open-connections-postgres/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How to find when Postgres tables were auto-vacuumed and auto-analyzed?</title>
		<link>http://heatware.net/databases/how-when-postgres-tables-auto-vacuum-analyze/</link>
		<comments>http://heatware.net/databases/how-when-postgres-tables-auto-vacuum-analyze/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 22:20:17 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=621</guid>
		<description><![CDATA[This article will show you how to determine when your database tables were last vacuumed, auto-vacuumed, analyzed, and auto-analyzed on a PostgresSQL 8.x database. Login to the PostgresSQL command-line interface psql -U [username] [database_name] Run the following query: select relname,last_vacuum, last_autovacuum, last_analyze, last_autoanalyze from pg_stat_user_tables;]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to determine when your database tables were last vacuumed, auto-vacuumed, analyzed, and auto-analyzed on a PostgresSQL 8.x database.</p>
<ol>
<li>Login to the PostgresSQL command-line interface</li>
<p><code>psql -U [username] [database_name]</code></p>
<li>Run the following query:</li>
<p><code>select relname,last_vacuum, last_autovacuum, last_analyze, last_autoanalyze from pg_stat_user_tables;</code>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/how-when-postgres-tables-auto-vacuum-analyze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to delete/drop a constraint in PostgresSQL</title>
		<link>http://heatware.net/databases/how-to-deletedrop-a-constraint-in-postgressql/</link>
		<comments>http://heatware.net/databases/how-to-deletedrop-a-constraint-in-postgressql/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 18:51:57 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[PostgreSQL]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=225</guid>
		<description><![CDATA[This article will show you how to drop a constraint, such as a foreign key constraint, on a PostgresSQL 8.x database. Login to the PostgresSQL command-line interface psql -U [username] [database_name] Show a list of constraints on a particular table \d [table_name] To Delete (or Drop) the constraint, use the command: ALTER TABLE [table_name] DROP [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to drop a constraint, such as a foreign key constraint, on a PostgresSQL 8.x database.</p>
<ol>
<li>Login to the PostgresSQL command-line interface</li>
<p><code>psql -U [username] [database_name]</code></p>
<li>Show a list of constraints on a particular table</li>
<p><code>\d [table_name]</code></p>
<li>To Delete (or Drop) the constraint, use the command:</li>
<p><code>ALTER TABLE [table_name] DROP CONSTRAINT [constraint_name];</code></ol>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/databases/how-to-deletedrop-a-constraint-in-postgressql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to parse a decimal number using &#8216;awk&#8217; and &#8216;cut&#8217; in Linux</title>
		<link>http://heatware.net/linux-unix/how-to-parse-a-decimal-number-using-awk-and-cut-in-linux/</link>
		<comments>http://heatware.net/linux-unix/how-to-parse-a-decimal-number-using-awk-and-cut-in-linux/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 20:12:36 +0000</pubDate>
		<dc:creator>sood</dc:creator>
				<category><![CDATA[Databases]]></category>
		<category><![CDATA[Linux/Unix]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://heatware.net/?p=191</guid>
		<description><![CDATA[This article will show you how to parse a decimal number (such as a software release number) into individual parts. For example, you can do this if you need to compare the the minor release number of two versions. There are numerous ways to accomplish the same thing using Linux and I will show you [...]]]></description>
			<content:encoded><![CDATA[<p>This article will show you how to parse a decimal number (such as a software release number) into individual parts. For example, you can do this if you need to compare the the minor release number of two versions. There are numerous ways to accomplish the same thing using Linux and I will show you two of them: <em>awk </em>and <em>cut</em>.</p>
<h3>Example 1 &#8211; Using awk</h3>
<p><strong>Number: 52.4</strong></p>
<p><code>echo "52.4" | awk 'BEGIN {FS="."}{print $1, $2}'</code><br />
<strong>Output:</strong> 52 4</p>
<p><code>echo "52.4" | awk 'BEGIN {FS="."}{print $1}'</code><br />
<strong>Output:</strong> 52</p>
<p><code>echo "52.4" | awk 'BEGIN {FS="."}{print $2}'</code><br />
<strong>Output:</strong> 4</p>
<h3>Example 2 &#8211; Using cut</h3>
<p><strong>Number: 1.0.2.66</strong><strong><br />
</strong></p>
<p><code>echo "1.0.2.66" | cut -d. -f1</code><br />
<strong>Output:</strong> 52 4</p>
<p><code>echo "1.0.2.66" | cut -d. -f2</code><br />
<strong>Output:</strong> 0</p>
<p><code>echo "1.0.2.66" | cut -d. -f3</code><br />
<strong>Output:</strong> 2</p>
<p><code>echo "1.0.2.66" | cut -d. -f4</code><br />
<strong>Output:</strong> 66</p>
<p>There you have it, two different methods for parsing decimal numbers!</p>
]]></content:encoded>
			<wfw:commentRss>http://heatware.net/linux-unix/how-to-parse-a-decimal-number-using-awk-and-cut-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

