 




<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: slow update Query(Primary Key)</title>
	<atom:link href="http://itknowledgeexchange.techtarget.com/itanswers/slow-update-queryprimary-key/feed/" rel="self" type="application/rss+xml" />
	<link>http://itknowledgeexchange.techtarget.com/itanswers/slow-update-queryprimary-key/</link>
	<description></description>
	<lastBuildDate>Thu, 23 May 2013 08:15:25 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
	<item>
		<title>By: carlosdl</title>
		<link>http://itknowledgeexchange.techtarget.com/itanswers/slow-update-queryprimary-key/#comment-65581</link>
		<dc:creator>carlosdl</dc:creator>
		<pubDate>Wed, 15 Jul 2009 18:16:25 +0000</pubDate>
		<guid isPermaLink="false">#comment-65581</guid>
		<description><![CDATA[How about something like this:

UPDATE auditdata 
SET TATCallType=&#039;12&#039;,TATCallUnit=&#039;1&#039; 
FROM auditdata a
WHERE EXISTS (  SELECT 1 FROM Auditdata_sms_12 WHERE id = a.id);

With an index on Auditdata_sms_12.id the full table scan of the subselect (if you use where ID in (select...) ) could be avoided.]]></description>
		<content:encoded><![CDATA[<p>How about something like this:</p>
<p>UPDATE auditdata<br />
SET TATCallType=&#8217;12&#8242;,TATCallUnit=&#8217;1&#8242;<br />
FROM auditdata a<br />
WHERE EXISTS (  SELECT 1 FROM Auditdata_sms_12 WHERE id = a.id);</p>
<p>With an index on Auditdata_sms_12.id the full table scan of the subselect (if you use where ID in (select&#8230;) ) could be avoided.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached
Database Caching 6/9 queries in 0.016 seconds using memcached
Object Caching 268/271 objects using memcached

Served from: itknowledgeexchange.techtarget.com @ 2013-05-23 08:15:56 -->