<?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>Image &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/type/image/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>Tue, 09 Oct 2018 19:59:51 +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: Optimize the Function by defining Volatility Classification</title>
		<link>https://www.dbrnd.com/2018/12/postgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable/</link>
					<comments>https://www.dbrnd.com/2018/12/postgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable/#respond</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 31 Dec 2018 16:16:24 +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[Function Optimization]]></category>
		<category><![CDATA[Function Volatility]]></category>
		<category><![CDATA[IMMUTABLE]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[STABLE]]></category>
		<category><![CDATA[VOLATILE]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7273</guid>

					<description><![CDATA[<div><img width="679" height="186" src="https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-679x186.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" fetchpriority="high" srcset="https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-679x186.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1030x282.jpg 1030w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-850x233.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1700x466.jpg 1700w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1358x372.jpg 1358w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function.jpg 2000w" sizes="(max-width: 679px) 100vw, 679px" /></div>This is an important article for PostgreSQL Developer because many of the database developers don&#8217;t know about the PostgreSQL Function Volatility. Every function has a volatility classification, with the possibilities being VOLATILE, STABLE, or IMMUTABLE. VOLATILE is the default. In this post, I am not going to write 1000 words on it. Because I believe [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="186" src="https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-679x186.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" srcset="https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-679x186.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1030x282.jpg 1030w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-850x233.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1700x466.jpg 1700w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function-1358x372.jpg 1358w, https://www.dbrnd.com/wp-content/uploads/2018/03/optimize-function.jpg 2000w" sizes="(max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&amp;linkname=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" 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%2F2018%2F12%2Fpostgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable%2F&#038;title=PostgreSQL%3A%20Optimize%20the%20Function%20by%20defining%20Volatility%20Classification" data-a2a-url="https://www.dbrnd.com/2018/12/postgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable/" data-a2a-title="PostgreSQL: Optimize the Function by defining Volatility Classification"></a></p><p>This is an important article for PostgreSQL Developer because many of the database developers don&#8217;t know about the PostgreSQL Function Volatility. </p>
<p>Every function has a volatility classification, with the possibilities being VOLATILE, STABLE, or IMMUTABLE. VOLATILE is the default.</p>
<blockquote><p>In this post, I am not going to write 1000 words on it. Because I believe in practical so sharing a good practical example here.<br />
But you must read about the PostgreSQL Function Volatility from <a href="https://www.postgresql.org/docs/8.1/static/xfunc-volatility.html" rel="noopener" target="_blank">this</a> official page. </p></blockquote>
<p>Check the below practical example and you will get to know that how VOLATILE function is choosing the bad Query Execution Plan. </p>
<p><strong>Create a sample function:</strong></p>
<pre class="crayon-plain-tag">CREATE OR REPLACE FUNCTION fn_getvalues(int, int)
RETURNS int
AS
$$
  BEGIN
       RETURN 
       	CASE WHEN $1 = $2 THEN $1 ELSE $2 END;
  END;
$$ LANGUAGE 'plpgsql';</pre> </p>
<p><strong>Check the result of sample function:</strong></p>
<pre class="crayon-plain-tag">SELECT * FROM fn_getvalues(50,80);

fn_getvalues
-----------------
80</pre> </p>
<p><strong>Create a sample table with data:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_ItemTransactions 
 (
     TranID SERIAL
     ,TransactionDate TIMESTAMPTZ
     ,TransactionName TEXT
 );

CREATE INDEX idx_TranID ON tbl_ItemTransactions (TranID);
 
INSERT INTO tbl_ItemTransactions 
(TransactionDate, TransactionName)
SELECT x, 'dbrnd' 
FROM generate_series('2017-01-01 00:00:00'::timestamptz, '2018-01-31 00:00:00'::timestamptz,'50 seconds'::interval) a(x);</pre> </p>
<p><strong>Check the execution plan for below query:</strong><br />
You can find &#8216;Index Scan&#8217; because the huge table and index applied properly. </p>
<pre class="crayon-plain-tag">EXPLAIN
SELECT *FROM tbl_ItemTransactions
WHERE TranID = 80

'Index Scan using idx_tranid on tbl_itemtransactions  (cost=0.42..8.44 rows=1 width=18)'
'  Index Cond: (tranid = 80)'</pre> </p>
<p><strong>Now, Use the early created function in the same query:</strong><br />
You can find &#8216;Seq Scan&#8217; because the function of the filter is creating a problem. Because VOLATILE is the default volatility classification.</p>
<pre class="crayon-plain-tag">EXPLAIN
SELECT *FROM tbl_ItemTransactions
WHERE TranID = fn_getvalues (50,80);

'Seq Scan on tbl_itemtransactions  (cost=0.00..183520.26 rows=1 width=18)'
'  Filter: (tranid = fn_getvalues(50, 80))'</pre> </p>
<p><strong>Now, Let&#8217;s create an IMMUTABLE function:</strong></p>
<pre class="crayon-plain-tag">CREATE OR REPLACE FUNCTION fn_getvalues(int, int)
RETURNS int
AS
$$
  BEGIN
       RETURN 
       	CASE WHEN $1 = $2 THEN $1 ELSE $2 END;
  END;
$$ LANGUAGE 'plpgsql' IMMUTABLE;</pre> </p>
<p><strong>Check the same query again:</strong><br />
You can find &#8216;Index Scan&#8217; which is expected and correct behaviour.<br />
EXPLAIN</p>
<pre class="crayon-plain-tag">SELECT *FROM tbl_ItemTransactions
WHERE TranID = fn_getvalues (50,80);

'Index Scan using idx_tranid on tbl_itemtransactions  (cost=0.42..8.44 rows=1 width=18)'
'  Index Cond: (tranid = 80)'</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/12/postgresql-optimize-the-function-by-defining-volatility-classification-immutable-volatile-stable/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: How to create Read Only Table?</title>
		<link>https://www.dbrnd.com/2018/09/sql-server-how-to-create-read-only-table/</link>
					<comments>https://www.dbrnd.com/2018/09/sql-server-how-to-create-read-only-table/#respond</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 10 Sep 2018 16:16:22 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Read Only Table]]></category>
		<category><![CDATA[SELECT Permission]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7494</guid>

					<description><![CDATA[<div><img width="619" height="348" src="https://www.dbrnd.com/wp-content/uploads/2018/04/SQL-Server-Read-Only-Table.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Read Only Table" decoding="async" /></div>In this post, I am sharing an option to create a Read Only table in SQL Server. I also shared an article on how to create a read only database in SQL Server? SQL Server: Script to make Database Read Only and Read Write If you thinking to give a SELECT permission on the table, [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="619" height="348" src="https://www.dbrnd.com/wp-content/uploads/2018/04/SQL-Server-Read-Only-Table.jpg" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Read Only Table" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&amp;linkname=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" 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%2F2018%2F09%2Fsql-server-how-to-create-read-only-table%2F&#038;title=SQL%20Server%3A%20How%20to%20create%20Read%20Only%20Table%3F" data-a2a-url="https://www.dbrnd.com/2018/09/sql-server-how-to-create-read-only-table/" data-a2a-title="SQL Server: How to create Read Only Table?"></a></p><p>In this post, I am sharing an option to create a Read Only table in SQL Server.<br />
I also shared an article on how to create a read only database in SQL Server?</p>
<blockquote class="wp-embedded-content" data-secret="O7yALbxraA"><p><a href="https://www.dbrnd.com/2016/03/sql-server-script-to-make-database-read-only-and-read-write/">SQL Server: Script to make Database Read Only and Read Write</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/03/sql-server-script-to-make-database-read-only-and-read-write/embed/#?secret=O7yALbxraA" data-secret="O7yALbxraA" width="600" height="338" title="&#8220;SQL Server: Script to make Database Read Only and Read Write&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>If you thinking to give a SELECT permission on the table, you have to give SELECT permission to particular group/user.<br />
But, here I am talking about complete Read Only Table, which has by default only SELECT permission for all the users/groups. </p>
<p><strong>How to create a Read Only Table?</strong></p>
<p><strong>Add one file group to database:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE my_database ADD FILEGROUP [Read_Only]</pre> </p>
<p><strong>Create a new data file:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE my_database ADD FILE ( NAME = N'data_file_name', FILENAME = N'D:\data_file_path.ndf' , SIZE = 3072KB , FILEGROWTH = 1024KB ) TO FILEGROUP [Read_Only]</pre> </p>
<p><strong>Create a table under newly created data group:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE test_readonly (id INT) ON [Read_Only]</pre> </p>
<p><strong>Load/Insert your data:</strong></p>
<pre class="crayon-plain-tag">INSERT INTO test_readonly VALUES (1),(2),(3),(4)</pre> </p>
<p><strong>Now, set READONLY to newly created file group:</strong></p>
<pre class="crayon-plain-tag">ALTER DATABASE my_database MODIFY FILEGROUP [Read_Only] READONLY</pre> </p>
<p><strong>Try to insert same records:</strong><br />
Now, you can&#8217;t insert/update/delete the data because a table is Read Only now. </p>
<pre class="crayon-plain-tag">INSERT INTO test_readonly VALUES (1),(2),(3),(4)

Msg 652, Level 16, State 1, Line 8
The index "" for table "dbo.test_readonly" (RowsetId 72057594042187776) resides on a read-only filegroup ("Read_Only"), which cannot be modified.</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/09/sql-server-how-to-create-read-only-table/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Basic performance test between SELECT INTO and INSERT INTO SELECT</title>
		<link>https://www.dbrnd.com/2018/07/sql-server-basic-performance-test-between-select-into-and-insert-into-select/</link>
					<comments>https://www.dbrnd.com/2018/07/sql-server-basic-performance-test-between-select-into-and-insert-into-select/#respond</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 23 Jul 2018 16:16:07 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[INSERT INTO SELECT]]></category>
		<category><![CDATA[SELECT INTO]]></category>
		<category><![CDATA[SQL Programming]]></category>
		<category><![CDATA[sql queries]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sqlcode]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7656</guid>

					<description><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-679x679.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-679x679.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-150x150.jpg 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-300x300.jpg 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-600x600.jpg 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad.jpg 800w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>In this post, I am doing a basic performance test between SELECT INTO and INSERT INTO SELECT option of SQL Server. Database Developers are using these options very frequently for copying data between the tables. But SELECT INTO is little faster than INSERT INTO SELECT option. Note: I am testing using a very small number [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-679x679.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-679x679.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-150x150.jpg 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-300x300.jpg 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad-600x600.jpg 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/Good-vs-Bad.jpg 800w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&amp;linkname=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" 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%2F2018%2F07%2Fsql-server-basic-performance-test-between-select-into-and-insert-into-select%2F&#038;title=SQL%20Server%3A%20Basic%20performance%20test%20between%20SELECT%20INTO%20and%20INSERT%20INTO%20SELECT" data-a2a-url="https://www.dbrnd.com/2018/07/sql-server-basic-performance-test-between-select-into-and-insert-into-select/" data-a2a-title="SQL Server: Basic performance test between SELECT INTO and INSERT INTO SELECT"></a></p><p>In this post, I am doing a basic performance test between SELECT INTO and INSERT INTO SELECT option of SQL Server. </p>
<p>Database Developers are using these options very frequently for copying data between the tables. But SELECT INTO is little faster than INSERT INTO SELECT option. </p>
<p><em>Note: I am testing using a very small number of sample records. If you are testing with a huge number of records, you may find a big difference in the performance. </em></p>
<p><strong>Please check the below examples: </strong></p>
<p><strong>Set Statistics:</strong></p>
<pre class="crayon-plain-tag">SET STATISTICS IO ON
SET STATISTICS TIME ON</pre> </p>
<p><strong>Create sample tables:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_MyData (ID INT, Name VARCHAR(10))
CREATE TABLE tbl_Mytable (ID INT, Name VARCHAR(10))

INSERT INTO tbl_MyData VALUES (1,'dbrnd')
GO 1000000</pre> </p>
<p><strong>Perform INSERT INTO SELECT:</strong></p>
<pre class="crayon-plain-tag">INSERT INTO  tbl_Mytable 
SELECT ID, Name 
FROM tbl_MyData</pre> </p>
<p><strong>Execution time:</strong></p>
<pre class="crayon-plain-tag">SQL Server Execution Times:
CPU time = 16 ms,  elapsed time = 37 ms.</pre> </p>
<p><strong>Perform SELECT INTO:</strong></p>
<pre class="crayon-plain-tag">SELECT ID, Name 
INTO tbl_MyTable2
FROM tbl_MyData</pre> </p>
<p><strong>Execution time:</strong></p>
<pre class="crayon-plain-tag">SQL Server Execution Times:
CPU time = 16 ms,  elapsed time = 21 ms.</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/07/sql-server-basic-performance-test-between-select-into-and-insert-into-select/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Extra Tabs and Spaces of object occupies more disk area</title>
		<link>https://www.dbrnd.com/2018/06/sql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area/</link>
					<comments>https://www.dbrnd.com/2018/06/sql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area/#respond</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Mon, 25 Jun 2018 16:16:13 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[Extra tabs and spaces]]></category>
		<category><![CDATA[SQL Programming]]></category>
		<category><![CDATA[sql queries]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sqlcode]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7663</guid>

					<description><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object.png 780w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>In this post, I am sharing an interesting fact on the disk usage by extra tabs and spaces of SQL Server object&#8217;s definition. Many of you don&#8217;t know that extra spaces and tabs are occupying the disk in SQL Server. People are creating their own coding standard and giving a huge number of extra spaces [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Taken-Extra-Space-of-Object.png 780w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&amp;linkname=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" 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%2F2018%2F06%2Fsql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area%2F&#038;title=SQL%20Server%3A%20Extra%20Tabs%20and%20Spaces%20of%20object%20occupies%20more%20disk%20area" data-a2a-url="https://www.dbrnd.com/2018/06/sql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area/" data-a2a-title="SQL Server: Extra Tabs and Spaces of object occupies more disk area"></a></p><p>In this post, I am sharing an interesting fact on the disk usage by extra tabs and spaces of SQL Server object&#8217;s definition.</p>
<p>Many of you don&#8217;t know that extra spaces and tabs are occupying the disk in SQL Server. People are creating their own coding standard and giving a huge number of extra spaces in the object definition. </p>
<blockquote><p>Nowadays, the disk is not that much costlier so few extra KBs/MBs we can afford. But I saw few servers, where companies are creating a separate database for each client and one database contained thousands of stored procedures. </p></blockquote>
<p><em>So I would suggest, please follow the best practices in your coding life.<br />
From tomorrow, I am going to share few articles on SQL Server Coding Standard and best practices.</em></p>
<p>Here, I created two stored procedures where one has extra tabs and other has normal spaces. You can easily get the size difference between these two stored procedures. </p>
<p><strong>Create sample Stored Procedure with extra Tabs and Spaces:</strong></p>
<pre class="crayon-plain-tag">CREATE PROCEDURE usp_ABC
AS
BEGIN
	DECLARE						@Name					VARCHAR(20)
	DECLARE						@Add					VARCHAR(100)	
END</pre> </p>
<p><strong>Create sample Stored Procedure without extra Tabs and Spaces:</strong></p>
<pre class="crayon-plain-tag">CREATE PROCEDURE usp_XYZ
AS
BEGIN
	DECLARE	@Name VARCHAR(20)
	DECLARE @Add VARCHAR(100)	
END</pre> </p>
<p><strong>Compare the size of above SPs:</strong></p>
<pre class="crayon-plain-tag">SELECT 
	[p].[name]
	,size = DATALENGTH([asm].[definition]) 
FROM sys.all_sql_modules AS asm
INNER JOIN sys.procedures AS p
ON [asm].[object_id] = [p].[object_id]
WHERE [p].[name] IN ('usp_ABC','usp_XYZ')</pre> </p>
<p><strong>Result:</strong></p>
<pre class="crayon-plain-tag">name          size
-----------  ---------
usp_ABC	      230
usp_XYZ       198</pre> </p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/06/sql-server-extra-tabs-and-spaces-of-object-occupies-more-disk-area/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>SQL Server: Set the default value to IMAGE Column or Binary Data</title>
		<link>https://www.dbrnd.com/2018/05/sql-server-set-the-default-value-to-image-column-or-binary-data/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 13 May 2018 16:16:31 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[binary zero value]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[default blob]]></category>
		<category><![CDATA[SQL Query]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7528</guid>

					<description><![CDATA[<div><img width="215" height="215" src="https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo.jpg 215w, https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo-150x150.jpg 150w" sizes="auto, (max-width: 215px) 100vw, 215px" /></div>In this post, I am sharing demonstration on how to add a default value to IMAGE or BLOB data type and what is the default value for a binary column in SQL Server? The &#8216;0x00&#8217; is a Binary Zeros and also uses as a string terminator. If you want to set any default value to [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="215" height="215" src="https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo.jpg 215w, https://www.dbrnd.com/wp-content/uploads/2018/04/Profile-Photo-150x150.jpg 150w" sizes="auto, (max-width: 215px) 100vw, 215px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&amp;linkname=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" 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%2F2018%2F05%2Fsql-server-set-the-default-value-to-image-column-or-binary-data%2F&#038;title=SQL%20Server%3A%20Set%20the%20default%20value%20to%20IMAGE%20Column%20or%20Binary%20Data" data-a2a-url="https://www.dbrnd.com/2018/05/sql-server-set-the-default-value-to-image-column-or-binary-data/" data-a2a-title="SQL Server: Set the default value to IMAGE Column or Binary Data"></a></p><p>In this post, I am sharing demonstration on how to add a default value to IMAGE or BLOB data type and what is the default value for a binary column in SQL Server?</p>
<p>The &#8216;0x00&#8217; is a Binary Zeros and also uses as a string terminator. If you want to set any default value to a binary column, you can use &#8216;0x00&#8217; which is safe and valid. </p>
<p><strong>Check the below demonstration:</strong></p>
<pre class="crayon-plain-tag">CREATE TABLE tbl_Students (StudID INT, StudName VARCHAR(15), StudPhoto IMAGE DEFAULT (0x00))

INSERT INTO tbl_Students(StudID,StudName) 
VALUES (1,'Anvesh')

SELECT *FROM tbl_Students

   StudName        StudPhoto
----------- --------------- -------
1           Anvesh          0x00</pre> </p>
<p><strong>Add default to an existing table:</strong></p>
<pre class="crayon-plain-tag">ALTER TABLE tbl_Students
ADD  CONSTRAINT df_tbl_Studentse_StudPhoto DEFAULT (0x00) FOR StudPhoto</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>DBRND listed by feedspot in the Category of Top 10 PostgreSQL Blogs</title>
		<link>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs/</link>
					<comments>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 06 May 2018 16:16:26 +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[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7587</guid>

					<description><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-850x850.png 850w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge.png 1000w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>What should I say? It&#8217;s honestly hard to believe it&#8217;s been a full three years since I became a blogger. As many of know that, I am doing blogging in my extra time so three years journey wasn&#8217;t smooth with a full time IT Job. But I am calculating a single day and working on [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge-850x850.png 850w, https://www.dbrnd.com/wp-content/uploads/2018/05/PostgreSQL-Badge.png 1000w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs%2F&#038;title=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2010%20PostgreSQL%20Blogs" data-a2a-url="https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs/" data-a2a-title="DBRND listed by feedspot in the Category of Top 10 PostgreSQL Blogs"></a></p><p><strong>What should I say?</strong></p>
<p><em>It&#8217;s honestly hard to believe it&#8217;s been a full three years since I became a blogger. </em></p>
<p><em>As many of know that, I am doing blogging in my extra time so three years journey wasn&#8217;t smooth with a full time IT Job. </em></p>
<p><em>But I am calculating a single day and working on every single day for tomorrow that&#8217;s the way we can see this progress report of DBRND. </em></p>
<p><em>Still, I am feeling that this blog is a look like a newborn baby and have to do more work for sharing best experiences towards the success of DBRND.</em></p>
<blockquote><p>Here, I am sharing a good news about DBRND which is listed by feedspot in the category of Top 30 SQL Server Blogs.<br />
<a href="https://blog.feedspot.com/postgresql_blogs/" rel="noopener" target="_blank">Click here for more details&#8230; </a></p></blockquote>
<p><strong>So time to say thank you to all of you&#8230;</strong></p>
<blockquote><p>Thank you to every single person who reads my blog- whether it’s one time or every single day.</p></blockquote>
<blockquote><p>Thank you to those who continued to encourage me throughout this journey.</p></blockquote>
<blockquote><p>Thank you to everyone who has taken the time to tell me how much they appreciate and how my blog post helped them. </p></blockquote>
<blockquote><p>Thank you to those who recommend this blog to their friends and continue to spread the word.</p></blockquote>
<blockquote><p>Thank you to everyone who is following and connected with me on the social media websites like Facebook, Linkdln, Twitter.</p></blockquote>
<blockquote><p>Thank you to my family members and every single one of you who have supported me from day one.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-10-postgresql-blogs/feed/</wfw:commentRss>
			<slash:comments>11</slash:comments>
		
		
			</item>
		<item>
		<title>DBRND listed by feedspot in the Category of Top 30 SQL Server Blogs</title>
		<link>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs/</link>
					<comments>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 05 May 2018 16:16:48 +0000</pubDate>
				<category><![CDATA[SQL Server]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[SQL Programming]]></category>
		<category><![CDATA[sql queries]]></category>
		<category><![CDATA[SQL Server Administrator]]></category>
		<category><![CDATA[SQL Server Error]]></category>
		<category><![CDATA[SQL Server Monitoring]]></category>
		<category><![CDATA[SQL Server Performance Tuning]]></category>
		<category><![CDATA[SQL Server Programming]]></category>
		<category><![CDATA[SQL Server Tips and Tricks]]></category>
		<category><![CDATA[sqlcode]]></category>
		<category><![CDATA[TSQL]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7578</guid>

					<description><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Badge" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-850x850.png 850w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge.png 1000w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>What should I say? It&#8217;s honestly hard to believe it&#8217;s been a full three years since I became a blogger. As many of know that, I am doing blogging in my extra time so three years journey wasn&#8217;t smooth with a full time IT Job. But I am calculating a single day and working on [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="679" src="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-679x679.png" class="attachment-post-image size-post-image wp-post-image" alt="SQL Server Badge" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-679x679.png 679w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-600x600.png 600w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge-850x850.png 850w, https://www.dbrnd.com/wp-content/uploads/2018/05/SQL-Server-Badge.png 1000w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&amp;linkname=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" 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%2F2018%2F05%2Fdbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs%2F&#038;title=DBRND%20listed%20by%20feedspot%20in%20the%20Category%20of%20Top%2030%20SQL%20Server%20Blogs" data-a2a-url="https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs/" data-a2a-title="DBRND listed by feedspot in the Category of Top 30 SQL Server Blogs"></a></p><p><strong>What should I say?</strong></p>
<p><em>It&#8217;s honestly hard to believe it&#8217;s been a full three years since I became a blogger. </em></p>
<p><em>As many of know that, I am doing blogging in my extra time so three years journey wasn&#8217;t smooth with a full time IT Job. </em></p>
<p><em>But I am calculating a single day and working on every single day for tomorrow that&#8217;s the way we can see this progress report of DBRND. </em></p>
<p><em>Still, I am feeling that this blog is a look like a newborn baby and have to do more work for sharing best experiences towards the success of DBRND.</em></p>
<blockquote><p>Here, I am sharing a good news about DBRND which is listed by feedspot in the category of Top 30 SQL Server Blogs.<br />
<a href="https://blog.feedspot.com/sql_blogs/" rel="noopener" target="_blank">Click here for more details&#8230; </a></p></blockquote>
<p><strong>So time to say thanks to all of you&#8230;</strong></p>
<blockquote><p>Thank you to every single person who reads my blog- whether it’s one time or every single day.</p></blockquote>
<blockquote><p>Thank you to those who continued to encourage me throughout this journey.</p></blockquote>
<blockquote><p>Thank you to everyone who has taken the time to tell me how much they appreciate and how my blog post helped them. </p></blockquote>
<blockquote><p>Thank you to those who recommend this blog to their friends and continue to spread the word.</p></blockquote>
<blockquote><p>Thank you to everyone who is following and connected with me on the social media websites like Facebook, Linkdln, Twitter.</p></blockquote>
<blockquote><p>Thank you to my family members and every single one of you who have supported me from day one.</p></blockquote>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/05/dbrnd-listed-by-feedspot-in-the-category-of-top-30-sql-server-blogs/feed/</wfw:commentRss>
			<slash:comments>28</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL: Change the Default Data Directory in Linux</title>
		<link>https://www.dbrnd.com/2018/04/postgresql-change-the-default-data-directory-in-linux/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sat, 28 Apr 2018 16:16:45 +0000</pubDate>
				<category><![CDATA[PostgreSQL]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[copy postgres data directory]]></category>
		<category><![CDATA[data directory]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[initdb]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7000</guid>

					<description><![CDATA[<div><img width="400" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir.png" class="attachment-post-image size-post-image wp-post-image" alt="MySQL Move Data Dir" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir.png 400w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-65x65.png 65w" sizes="auto, (max-width: 400px) 100vw, 400px" /></div>In this post, I am sharing basic steps for changing the default Windows Data Directory of the PostgreSQL in Linux. When we install PostgreSQL on Linux operating system, by default it stores in “/var/lib/postgresql/[version]/data/” Always best practice is to store database data on the separate drive instead of the system drives. PostgreSQL: Change or Move [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="400" height="400" src="https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir.png" class="attachment-post-image size-post-image wp-post-image" alt="MySQL Move Data Dir" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir.png 400w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-150x150.png 150w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-300x300.png 300w, https://www.dbrnd.com/wp-content/uploads/2017/07/MySQLMoveDataDir-65x65.png 65w" sizes="auto, (max-width: 400px) 100vw, 400px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&amp;linkname=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" 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%2F2018%2F04%2Fpostgresql-change-the-default-data-directory-in-linux%2F&#038;title=PostgreSQL%3A%20Change%20the%20Default%20Data%20Directory%20in%20Linux" data-a2a-url="https://www.dbrnd.com/2018/04/postgresql-change-the-default-data-directory-in-linux/" data-a2a-title="PostgreSQL: Change the Default Data Directory in Linux"></a></p><p>In this post, I am sharing basic steps for changing the default Windows Data Directory of the PostgreSQL in Linux.</p>
<p>When we install PostgreSQL on Linux operating system, by default it stores in “/var/lib/postgresql/[version]/data/”</p>
<p>Always best practice is to store database data on the separate drive instead of the system drives.</p>
<blockquote class="wp-embedded-content" data-secret="keiyJmNYhy"><p><a href="https://www.dbrnd.com/2016/08/postgresql-change-or-move-default-data-directory-in-windows-operating-system/">PostgreSQL: Change or Move Default Data Directory in Windows</a></p></blockquote>
<p><iframe loading="lazy" class="wp-embedded-content" sandbox="allow-scripts" security="restricted"  src="https://www.dbrnd.com/2016/08/postgresql-change-or-move-default-data-directory-in-windows-operating-system/embed/#?secret=keiyJmNYhy" data-secret="keiyJmNYhy" width="600" height="338" title="&#8220;PostgreSQL: Change or Move Default Data Directory in Windows&#8221; &#8212; Database Research &amp; Development" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p><strong>Create a new directory:</strong></p>
<pre class="crayon-plain-tag">mkdir postgres_data_dir</pre> </p>
<p><strong>Give directory ownership to your Linux user:</strong></p>
<pre class="crayon-plain-tag">chown user_name postgres_data_dir</pre> </p>
<p><strong>Log in with your postgres user and initialize the database at the new location:</strong></p>
<pre class="crayon-plain-tag">initdb -D /postgres/test/postgres_data_dir</pre> </p>
<p><strong>OR</strong></p>
<p><strong>STOP and then START Postgres with new data directory:</strong></p>
<pre class="crayon-plain-tag">postgres -D /postgres/test/postgres_data_dir</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>PostgreSQL: How to Recover postgres User Password?</title>
		<link>https://www.dbrnd.com/2018/04/postgresql-how-to-recover-postgres-user-password/</link>
					<comments>https://www.dbrnd.com/2018/04/postgresql-how-to-recover-postgres-user-password/#comments</comments>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 25 Apr 2018 17:50:20 +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[forget postgres password]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgres user]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<category><![CDATA[recover postgres password]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7025</guid>

					<description><![CDATA[<div><img width="600" height="520" src="https://www.dbrnd.com/wp-content/uploads/2018/01/dont-forget-postgres-password.png" class="attachment-post-image size-post-image wp-post-image" alt="dont forget postgres password" decoding="async" loading="lazy" /></div>In this post, I am sharing few steps for recovering the forgot password of postgres user (admin user) of PostgreSQL. Yesterday, I was checking few forums of PostgreSQL and found that few DBAs forgot their password after installation of PostgreSQL. The postgres user is a superuser of PostgreSQL, and it is a default user also. [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="600" height="520" src="https://www.dbrnd.com/wp-content/uploads/2018/01/dont-forget-postgres-password.png" class="attachment-post-image size-post-image wp-post-image" alt="dont forget postgres password" decoding="async" loading="lazy" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&amp;linkname=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" 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%2F2018%2F04%2Fpostgresql-how-to-recover-postgres-user-password%2F&#038;title=PostgreSQL%3A%20How%20to%20Recover%20postgres%20User%20Password%3F" data-a2a-url="https://www.dbrnd.com/2018/04/postgresql-how-to-recover-postgres-user-password/" data-a2a-title="PostgreSQL: How to Recover postgres User Password?"></a></p><p>In this post, I am sharing few steps for recovering the forgot password of postgres user (admin user) of PostgreSQL. </p>
<p>Yesterday, I was checking few forums of PostgreSQL and found that few DBAs forgot their password after installation of PostgreSQL. </p>
<blockquote><p>The postgres user is a superuser of PostgreSQL, and it is a default user also. While installing PostgreSQL, you have to set the password of postgres user, and if you forget the password, you can&#8217;t do any operation like create first DB or create first DB User. </p></blockquote>
<p><strong>How to recover forgotten password of PostgreSQL?</strong></p>
<p><strong>Edit pg_hba.conf file:</strong><br />
Change below line for MD5 to TRUST </p>
<pre class="crayon-plain-tag">host    all      postgres    127.0.0.1/32     trust</pre> </p>
<p><strong>Restart the PostgreSQL Server:</strong></p>
<pre class="crayon-plain-tag">sudo /etc/init.d/postgresql restart</pre> </p>
<p><strong>Connect the PostgreSQL:</strong></p>
<pre class="crayon-plain-tag">psql -h localhost -U postgres</pre> </p>
<p><strong>Change the password of postgres user:</strong></p>
<pre class="crayon-plain-tag">ALTER USER postgres with password 'new_password';</pre> </p>
<p><strong>Last, rollback the change in pg_hba.conf file and restart the PostgreSQL Server:</strong></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.dbrnd.com/2018/04/postgresql-how-to-recover-postgres-user-password/feed/</wfw:commentRss>
			<slash:comments>3</slash:comments>
		
		
			</item>
		<item>
		<title>PostgreSQL: Use pgbench for testing the Load Performance of Server</title>
		<link>https://www.dbrnd.com/2018/04/postgresql-use-pgbench-for-testing-the-load-performance-of-server/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 12 Apr 2018 16:16:31 +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[measure the performance]]></category>
		<category><![CDATA[performance testing]]></category>
		<category><![CDATA[pgbench]]></category>
		<category><![CDATA[plpgsql]]></category>
		<category><![CDATA[Postgres Query]]></category>
		<category><![CDATA[postgresql]]></category>
		<category><![CDATA[PostgreSQL Administrator]]></category>
		<category><![CDATA[PostgreSQL Error]]></category>
		<category><![CDATA[PostgreSQL load testing]]></category>
		<category><![CDATA[PostgreSQL Monitoring]]></category>
		<category><![CDATA[PostgreSQL Performance Tuning]]></category>
		<category><![CDATA[PostgreSQL Programming]]></category>
		<category><![CDATA[PostgreSQL Tips and Tricks]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7377</guid>

					<description><![CDATA[<div><img width="679" height="509" src="https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-679x509.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-679x509.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1030x773.jpg 1030w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-850x638.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1700x1275.jpg 1700w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1358x1019.jpg 1358w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div>Sharing a very important article on the Load testing of PostgreSQL. Since last three years, I am sharing multiple articles on PostgreSQL Database Optimization Techniques and Solutions. But for the bad performance, always database design, table design, fragmentation, indexes are not only the problem. There are lot many other things, that we can test and [&#8230;]]]></description>
										<content:encoded><![CDATA[<div><img width="679" height="509" src="https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-679x509.jpg" class="attachment-post-image size-post-image wp-post-image" alt="" decoding="async" loading="lazy" srcset="https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-679x509.jpg 679w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1030x773.jpg 1030w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-850x638.jpg 850w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1700x1275.jpg 1700w, https://www.dbrnd.com/wp-content/uploads/2018/04/pgbench-performance-1358x1019.jpg 1358w" sizes="auto, (max-width: 679px) 100vw, 679px" /></div><p><a class="a2a_button_facebook" href="https://www.addtoany.com/add_to/facebook?linkurl=https%3A%2F%2Fwww.dbrnd.com%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&amp;linkname=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" 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%2F2018%2F04%2Fpostgresql-use-pgbench-for-testing-the-load-performance-of-server%2F&#038;title=PostgreSQL%3A%20Use%20pgbench%20for%20testing%20the%20Load%20Performance%20of%20Server" data-a2a-url="https://www.dbrnd.com/2018/04/postgresql-use-pgbench-for-testing-the-load-performance-of-server/" data-a2a-title="PostgreSQL: Use pgbench for testing the Load Performance of Server"></a></p><p>Sharing a very important article on the Load testing of PostgreSQL. Since last three years, I am sharing multiple articles on PostgreSQL Database Optimization Techniques and Solutions.</p>
<p>But for the bad performance, always database design, table design, fragmentation, indexes are not only the problem.<br />
There are lot many other things, that we can test and measure the Performance of PostgreSQL Database Server.</p>
<blockquote><p>First very most important is, how application or user connects to the database server, how hardware configured for the server, Is server setup for the read operation only or write operation only, there are many things that we can measure by using the PGBENCH utility.</p>
<p>Using pgbench, we can actually perform the load testing on PostgreSQL Server. For example, set number connection, process threads, time to complete and many more.</p></blockquote>
<p>This is a really very cool utility with lots of examples which you can find in this <a href="https://wiki.postgresql.org/wiki/Pgbenchtesting" target="_blank" rel="noopener">wiki</a>. For more options, please visit <a href="https://www.postgresql.org/docs/current/static/pgbench.html" target="_blank" rel="noopener">this</a>.</p>
<p>Check the different options and try it your self.</p>
<p><strong>Sharing one example:</strong><br />
I am checking the performance of concurrent 20 connections with 4 threads and max time is 60 seconds. here, &#8220;dbrnd&#8221; is my database and &#8220;postgres&#8221; is a DB User.</p><pre class="crayon-plain-tag">pgbench -U postgres -c 20 -j 4 -T 60 -N dbrnd</pre><p>
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-7379" src="https://www.dbrnd.com/wp-content/uploads/2018/04/PostgreSQL-pgbench.png" alt="" width="733" height="345" srcset="https://www.dbrnd.com/wp-content/uploads/2018/04/PostgreSQL-pgbench.png 733w, https://www.dbrnd.com/wp-content/uploads/2018/04/PostgreSQL-pgbench-679x320.png 679w" sizes="auto, (max-width: 733px) 100vw, 733px" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
