<?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_resqueue_status &#8211; Database Research &amp; Development</title>
	<atom:link href="https://www.dbrnd.com/tag/gp_resqueue_status/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:43:57 +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: Script to find running queries or statements which are Waiting in Resource Queues</title>
		<link>https://www.dbrnd.com/2017/11/greenplum-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Thu, 30 Nov 2017 16:16:09 +0000</pubDate>
				<category><![CDATA[Greenplum]]></category>
		<category><![CDATA[Greenplum DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[gp_resqueue_status]]></category>
		<category><![CDATA[gp_toolkit]]></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=6120</guid>

					<description><![CDATA[In this post, I am sharing a script to check the list of running queries or statements which are waiting in the Resource Queues of Greenplum. The Workload management of Greenplum means &#8211; Set priorities of database user&#8217;s queries using Resource Queues. If you create RQ with the limit of 10 concurrent queries and user [&#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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" 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-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues%2F&#038;title=Greenplum%3A%20Script%20to%20find%20running%20queries%20or%20statements%20which%20are%20Waiting%20in%20Resource%20Queues" data-a2a-url="https://www.dbrnd.com/2017/11/greenplum-script-to-find-running-queries-or-statements-which-are-waiting-in-resource-queues/" data-a2a-title="Greenplum: Script to find running queries or statements which are Waiting in Resource Queues"></a></p><p>In this post, I am sharing a script to check the list of running queries or statements which are waiting in the Resource Queues of Greenplum. </p>
<blockquote><p>The Workload management of Greenplum means &#8211; Set priorities of database user&#8217;s queries using Resource Queues. If you create RQ with the limit of 10 concurrent queries and user is trying to execute more than 10 queries at a time then few RQ keeps few queries in the waiting mode. </p></blockquote>
<p>Using below query, you can get the list of running queries which are in the waiting mode.</p>
<pre class="crayon-plain-tag">SELECT
	rolname
	,rsqname
	,pid
	,granted
	,current_query
	,datname
FROM pg_roles, gp_toolkit.gp_resqueue_status
,pg_locks, pg_stat_activity
WHERE pg_roles.rolresqueue=pg_locks.objid
	AND pg_locks.objid=gp_toolkit.gp_resqueue_status.queueid
	AND pg_stat_activity.procpid=pg_locks.pid
	AND pg_stat_activity.usename=pg_roles.rolnam</pre> </p>
]]></content:encoded>
					
		
		
			</item>
		<item>
		<title>Greenplum: Script to find configuration information of Resource Queues</title>
		<link>https://www.dbrnd.com/2017/06/greenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management/</link>
		
		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Fri, 09 Jun 2017 16:16:05 +0000</pubDate>
				<category><![CDATA[Greenplum]]></category>
		<category><![CDATA[Greenplum DBA Script]]></category>
		<category><![CDATA[Anvesh Patel]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[database research and development]]></category>
		<category><![CDATA[dbrnd]]></category>
		<category><![CDATA[gp_resqueue_status]]></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 Queues]]></category>
		<category><![CDATA[work load]]></category>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5375</guid>

					<description><![CDATA[In this post, I am sharing a script to get all the information related to configured Resource Queues of Greenplum. Once we set resource queues and their priorities, then also we should check RQ configuration frequently to achieve the frequent changes in user role group and their preferences. [crayon-6ab55fa6d586b886304268/]]]></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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&amp;linkname=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" 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%2F06%2Fgreenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management%2F&#038;title=Greenplum%3A%20Script%20to%20find%20configuration%20information%20of%20Resource%20Queues" data-a2a-url="https://www.dbrnd.com/2017/06/greenplum-script-to-find-configuration-information-of-resource-queues-gp_resqueue_status-work-load-management/" data-a2a-title="Greenplum: Script to find configuration information of Resource Queues"></a></p><p>In this post, I am sharing a script to get all the information related to configured Resource Queues of Greenplum.<br />
Once we set resource queues and their priorities, then also we should check RQ configuration frequently to achieve the frequent changes in user role group and their preferences.</p>
<pre class="crayon-plain-tag">SELECT
	grs.rsqname       
	,grs.rsqcountlimit 
	,grs.rsqcountvalue  
	,grs.rsqcostlimit   
	,grs.rsqcostvalue   
	,grs.rsqmemorylimit 
	,grs.rsqmemoryvalue 
	,grs.rsqwaiters     
	,grs.rsqholders     
	,(select ressetting from pg_resqueue_attributes b
	where b.rsqname = grs.rsqname and resname='priority') as Priority
	,(select ressetting from pg_resqueue_attributes b
	where grs.rsqname=b.rsqname and resname='cost_overcommit') as CostOvercommit
	,(select count(*) from pg_resqueue x,pg_roles y
	where x.oid=y.rolresqueue and grs.rsqname=x.rsqname) as RQAssignedUsers
	,(select count(*) from pg_resqueue x,pg_roles y
	where x.oid=y.rolresqueue and grs.rsqname=x.rsqname and y.rolcanlogin = 't') as RQLogUsers
	,(select count(*) from pg_resqueue x,pg_roles y
	where x.oid=y.rolresqueue and grs.rsqname=x.rsqname and y.rolcanlogin = 'f') as RQGroupUsers
FROM gp_toolkit.gp_resqueue_status grs;</pre> </p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
