<?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>postgres hard drive &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/postgres-hard-drive/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Mon, 12 Sep 2016 19:45:32 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.4</generator>
	<item>
		<title>PostgreSQL: Create or Change default Tablespace of Table to Migrate on SSD</title>
		<link>https://www.dbrnd.com/2016/09/postgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance/</link>
					<comments>https://www.dbrnd.com/2016/09/postgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 11 Sep 2016 19:45:12 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[disk performance]]></category>
		<category><![CDATA[pg_default]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[postgres hard drive]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[SSD]]></category>
		<category><![CDATA[Tablespace]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=3629</guid>

					<description><![CDATA[My Problem: In our Windows based PostgreSQL Server, We were facing Hard disk related performance issue. Later, we decided to move some of our main tables on SSD Hard Disk (Solid State Drive). The Performance of SSD Hard drive is 10 times faster than normal HDD Disk. The Solution: First, We have to create new [&#8230;]]]></description>
										<content:encoded><![CDATA[<p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="Facebook" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_twitter" href="https://www.addtoany.com/add_to/twitter?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="Twitter" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_linkedin" href="https://www.addtoany.com/add_to/linkedin?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="LinkedIn" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pinterest" href="https://www.addtoany.com/add_to/pinterest?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="Pinterest" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_reddit" href="https://www.addtoany.com/add_to/reddit?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="Reddit" rel="nofollow noopener" target="_blank"></a><a class="a2a_button_pocket" href="https://www.addtoany.com/add_to/pocket?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&amp;linkname=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" title="Pocket" rel="nofollow noopener" target="_blank"></a><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fwww.dbrnd.com%2F2016%2F09%2Fpostgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance%2F&#038;title=PostgreSQL%3A%20Create%20or%20Change%20default%20Tablespace%20of%20Table%20to%20Migrate%20on%20SSD" data-a2a-url="https://www.dbrnd.com/2016/09/postgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance/" data-a2a-title="PostgreSQL: Create or Change default Tablespace of Table to Migrate on SSD"></a></p><p><strong>My Problem: </strong></p>
<blockquote><p>In our Windows based PostgreSQL Server, We were facing Hard disk related performance issue. Later, we decided to move some of our main tables on SSD Hard Disk (Solid State Drive).</p></blockquote>
<blockquote><p>The Performance of SSD Hard drive is 10 times faster than normal HDD Disk.</p></blockquote>
<p><strong>The Solution:</strong></p>
<blockquote><p>First, We have to create new Tablespace on SSD disk. The pg_default is a default Tablespace in PostgreSQL. A Tablespace contains all Table information and data. </p></blockquote>
<blockquote><p>In PostgreSQL, We can create a new Tablespace or we can also alter Tablespace for existing Tables.<br />
We can perform this exercise using both PGAdmin tool and Script.</p></blockquote>
<p>In below example, I am creating and changing Tablespace using script. </p>
<p><strong>The Syntax of CREATE TABLESPACE:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLESPACE tablespace_name
OWNER user_name
LOCATION directory_path;</pre> </p>
<p><strong>Create a sample Tablespace:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLESPACE dbrnd
OWNER postgres
LOCATION 'E:\temp\dbrnd';</pre> </p>
<p><strong>Create a new table under newly created Tablespace:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Students
(Rno INT, Name CHARACTER VARYING)
TABLESPACE dbrnd;</pre> </p>
<p><strong>We can also change default Tablespace:</strong><br />
After this change, all your newly table can create under dbrnd Tablespace. </p>
<pre class="crayon-plain-tag">SET default_tablespace = dbrnd;</pre> </p>
<p><strong>Create one more table and test this:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Employee
(Eno INT, Name CHARACTER VARYING);</pre> </p>
<p><strong>Change Tablespace of existing Table:</strong></p>
<pre class="crayon-plain-tag">ALTER TABLE tbl_Employee SET TABLESPACE pg_default;</pre> </p>
<p><strong>Check all Tablespace of your PostgreSQL Database Server:</strong></p>
<pre class="crayon-plain-tag">SELECT spcname FROM pg_tablespace;</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2016/09/postgresql-create-or-change-default-tablespace-of-table-to-migrate-on-ssd-solid-state-drive-better-performance/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
