<?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>WorkingScripts &#187; Performance</title>
	<atom:link href="http://workingscripts.com/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://workingscripts.com</link>
	<description>The Stuff that Just Works</description>
	<lastBuildDate>Mon, 07 Jun 2010 20:06:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Non-Shared Temp Tables Cleanup</title>
		<link>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/</link>
		<comments>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/#comments</comments>
		<pubDate>Fri, 07 Mar 2008 22:26:00 +0000</pubDate>
		<dc:creator>Iouri Chadour</dc:creator>
				<category><![CDATA[PeopleSoft]]></category>
		<category><![CDATA[PeopleTools]]></category>
		<category><![CDATA[Performance]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://workingscripts.com/?p=42</guid>
		<description><![CDATA[Some of the processes that depend on shared table instances , can experience a dramatic differences in performance, in case all of the instances available are being used, or remaining locked by some orphan or failed process. One way to resolve this problem is to go online and check if tables should be “released”. Here [...]]]></description>
			<content:encoded><![CDATA[<p>Some of the processes that depend on shared table instances , can experience a dramatic differences in performance, in case all of the instances available are being used, or remaining locked by some orphan or failed process. One way to resolve this problem is to go online and check if tables should be “released”. Here is a set of SQLs that would allow you to do the same thing and depending on you requirements – allow to automate this process, which could prove critical during the times of high usage:</p>
<div id="codeSnippetWrapper" style="border-right: silver 1px solid; padding-right: 4px; border-top: silver 1px solid; padding-left: 4px; font-size: 8pt; padding-bottom: 4px; margin: 20px 0px 10px; overflow: auto; border-left: silver 1px solid; width: 97.5%; cursor: text; direction: ltr; max-height: 200px; line-height: 12pt; padding-top: 4px; border-bottom: silver 1px solid; font-family: &#39;Courier New&#39;, courier, monospace; background-color: #f4f4f4; text-align: left">
<pre id="codeSnippet" style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 99.49%; color: black; direction: ltr; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; height: 340px; background-color: #f4f4f4; text-align: left; border-bottom-style: none"><span style="color: #008000">-- Shared Temp Table instance control table</span><span style="color: #0000ff">SELECT</span>  * <span style="color: #0000ff">FROM</span> PS_TEMP_TBL_ASGNM<span style="color: #0000ff">WHERE</span> TEMP_TBL_NAME = <span style="color: #006080">'table_name'</span><span style="color: #0000ff">WITH</span> UR

<span style="color: #008000">-- Get tables that were locked by processes that ran 200 instance numbers before</span><span style="color: #0000ff">SELECT</span>  * <span style="color: #0000ff">FROM</span> PS_TEMP_TBL_ASGNM<span style="color: #0000ff">WHERE</span> in_use_sw = <span style="color: #006080">'Y'</span> <span style="color: #0000ff">AND</span> process_instance &lt; (<span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">max</span> (prcsinstance) - 200                                                 <span style="color: #0000ff">FROM</span> psfssys.psprcsrqst                                                <span style="color: #0000ff">WHERE</span> runstatus = <span style="color: #006080">'9'</span>)<span style="color: #0000ff">with</span> ur

<span style="color: #008000">-- RELEASE ALL TEMP TABLE LOCKS </span><span style="color: #008000">-- FROM PROCESS INSTANCES THAT ARE LESS THAN 200 THAN THE LAST SUCCESSFUL ONE</span><span style="color: #0000ff">UPDATE</span> ps_temp_tbl_asgnm   <span style="color: #0000ff">SET</span> in_use_sw = <span style="color: #006080">'N'</span>, PROCESS_INSTANCE = 0<span style="color: #0000ff">WHERE</span> in_use_sw = <span style="color: #006080">'Y'</span> <span style="color: #0000ff">AND</span> process_instance  &lt; (<span style="color: #0000ff">SELECT</span> <span style="color: #0000ff">max</span> (prcsinstance) - 200                                                 <span style="color: #0000ff">FROM</span> psfssys.psprcsrqst                                                <span style="color: #0000ff">WHERE</span> runstatus = <span style="color: #006080">'9'</span>)

</pre>
<p></div>
<p>Let me know if you have any questions</p>
]]></content:encoded>
			<wfw:commentRss>http://workingscripts.com/2008/03/nonshared-temp-tables-cleanup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
