<?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>gp_adjust_priority &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/gp_adjust_priority/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>Fri, 22 Sep 2017 20:36:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>Greenplum: How to reset the Priority of Running Statement or Transaction?</title>
		<link>https://www.dbrnd.com/2017/11/greenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Tue, 07 Nov 2017 16:16:59 +0000</pubDate>
				<category><![CDATA[Greenplum]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[gp_adjust_priority]]></category>
		<category><![CDATA[Greenplum Administrator]]></category>
		<category><![CDATA[Greenplum Error]]></category>
		<category><![CDATA[Greenplum Monitoring]]></category>
		<category><![CDATA[Greenplum Performance Tuning]]></category>
		<category><![CDATA[Greenplum Programming]]></category>
		<category><![CDATA[Greenplum Query]]></category>
		<category><![CDATA[Greenplum Tips and Tricks]]></category>
		<category><![CDATA[PostgreSQL 8.2]]></category>
		<category><![CDATA[Resource Queue]]></category>
		<category><![CDATA[Workload management]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=6093</guid>

					<description><![CDATA[In this post, I am sharing one of the important articles on how to reset the priority of running or active statement of Greenplum. The Work Load management of Greenplum means &#8211; define the different Resource Queues with options like priority, memory, CPU. RQ associates with the user and all statement of this user will [&#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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&amp;linkname=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%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%2F2017%2F11%2Fgreenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority%2F&#038;title=Greenplum%3A%20How%20to%20reset%20the%20Priority%20of%20Running%20Statement%20or%20Transaction%3F" data-a2a-url="https://www.dbrnd.com/2017/11/greenplum-how-to-reset-the-priority-of-running-statement-or-transaction-gp_adjust_priority/" data-a2a-title="Greenplum: How to reset the Priority of Running Statement or Transaction?"></a></p><p>In this post, I am sharing one of the important articles on how to reset the priority of running or active statement of Greenplum. </p>
<p>The Work Load management of Greenplum means &#8211; define the different Resource Queues with options like priority, memory, CPU.<br />
RQ associates with the user and all statement of this user will execute basis on specified priority setting in that RQ.</p>
<p>Let me give you one scenario, where I used this. </p>
<blockquote><p>Recently, I found one long running query in our Greenplum server.<br />
I checked the priority of that running query which was LOW, and that only one query was running at that time. </p>
<p>So now, I wanted to complete that query as soon as possible, so the solution was to change the priority from LOW to HIGH. &#8211; For only that running query. </p></blockquote>
<p>I used below script and changed the priority and query got completed in next six minutes. We can use gp_adjust_priority() to change the priority of running statements. </p>
<blockquote><p>Be careful &#8211; Below query will alter the priority of queries which are running more than 20 minutes.<br />
So if you want to analyze the queries, you should use * and comment &#8212; gp_adjust_priority(psa.sess_id,rpb.rqpcommand,&#8217;HIGH&#8217;)</p></blockquote>
<pre class="crayon-plain-tag">SELECT gp_adjust_priority(psa.sess_id,rpb.rqpcommand,'HIGH')
FROM gp_toolkit.gp_resq_priority_backend rpb
JOIN pg_stat_activity psa
ON rpb.rqpsession = psa.sess_id
WHERE EXTRACT(epoch from current_timestamp-psa.query_start)/60 &gt; 20</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
