<?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: Logless, lockless Netezza more carefully explained</title>
	<atom:link href="http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/</link>
	<description>Choices in data management and analysis</description>
	<lastBuildDate>Thu, 09 Feb 2012 13:48:12 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Jerry Leichter</title>
		<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-134478</link>
		<dc:creator>Jerry Leichter</dc:creator>
		<pubDate>Sun, 09 Aug 2009 11:19:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-134478</guid>
		<description>re: asdf
This comment sat for months without the obvious reply:  You&#039;re ignoring commits.  Oversimplifying:  While the two transactions are both active, they will each think they incremented the counter from 0 to 1.  There&#039;s no problem with that; *uncommitted* transactions aren&#039;t serializable and don&#039;t need to maintain global consistency.  When it comes time to commit, the rules is:  You can only *commit* a value if the timestamp on it matches the timestamp it had when you read it.  So the first transaction will succeed in committing, while the second will abort.  ACID is maintained.

The logic here is that a transaction acts as if it&#039;s working on a snapshot of the database as it existed at the time the transaction began.  It can neither read nor write anything that is more recent than the snapshot.  Attempted reading can be handled by looking at history; attempted writing - &quot;changing history&quot; - forces an abort.

Three things to consider:

- The work done by the aborted transaction is lost - as is the case with *any* aborted transaction.  A clash of timestamps like this is the analogue of a deadlock in a lock-based system.  MVCC systems are called &quot;optimistic&quot; because they assume such clashes will be rare enough not to matter - just as a lock-based system assumes deadlocks are rare.  Both systems remain correct if their assumptions are violated, but performance disintegrates.

- There are optimizations to avoid wasting too much work.   If read the counter&#039;s timestamp &quot;with intent to lock&quot;, we can mark the counter to say that, and a second &quot;read with intent to lock&quot; can abort right away.  Or the system can abort the new of the two transactions, or the one that has fewer pending writes, or whatever.  Whether these approaches help or hurt has to be determined.

- There are more subtle interactions:  Transaction A reads and increments counter; transaction B reads counter and writes it to counter2.  If A commits before B does, B won&#039;t abort, but we lose global serialization with respect to the timestamps (and if you have another counter and another transaction, there may be no consistent serial order at all).  Fully developed MVCC systems have to deal with this kind of thing - or you can decide that the really strong &quot;global semantic consistency&quot; being violated here is more than you care about.  (You don&#039;t always get it with locking systems either.)</description>
		<content:encoded><![CDATA[<p>re: asdf<br />
This comment sat for months without the obvious reply:  You&#8217;re ignoring commits.  Oversimplifying:  While the two transactions are both active, they will each think they incremented the counter from 0 to 1.  There&#8217;s no problem with that; *uncommitted* transactions aren&#8217;t serializable and don&#8217;t need to maintain global consistency.  When it comes time to commit, the rules is:  You can only *commit* a value if the timestamp on it matches the timestamp it had when you read it.  So the first transaction will succeed in committing, while the second will abort.  ACID is maintained.</p>
<p>The logic here is that a transaction acts as if it&#8217;s working on a snapshot of the database as it existed at the time the transaction began.  It can neither read nor write anything that is more recent than the snapshot.  Attempted reading can be handled by looking at history; attempted writing &#8211; &#8220;changing history&#8221; &#8211; forces an abort.</p>
<p>Three things to consider:</p>
<p>- The work done by the aborted transaction is lost &#8211; as is the case with *any* aborted transaction.  A clash of timestamps like this is the analogue of a deadlock in a lock-based system.  MVCC systems are called &#8220;optimistic&#8221; because they assume such clashes will be rare enough not to matter &#8211; just as a lock-based system assumes deadlocks are rare.  Both systems remain correct if their assumptions are violated, but performance disintegrates.</p>
<p>- There are optimizations to avoid wasting too much work.   If read the counter&#8217;s timestamp &#8220;with intent to lock&#8221;, we can mark the counter to say that, and a second &#8220;read with intent to lock&#8221; can abort right away.  Or the system can abort the new of the two transactions, or the one that has fewer pending writes, or whatever.  Whether these approaches help or hurt has to be determined.</p>
<p>- There are more subtle interactions:  Transaction A reads and increments counter; transaction B reads counter and writes it to counter2.  If A commits before B does, B won&#8217;t abort, but we lose global serialization with respect to the timestamps (and if you have another counter and another transaction, there may be no consistent serial order at all).  Fully developed MVCC systems have to deal with this kind of thing &#8211; or you can decide that the really strong &#8220;global semantic consistency&#8221; being violated here is more than you care about.  (You don&#8217;t always get it with locking systems either.)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: What does Netezza do in the FPGAs anyway, and other questions &#124; DBMS2 -- DataBase Management System Services</title>
		<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-134348</link>
		<dc:creator>What does Netezza do in the FPGAs anyway, and other questions &#124; DBMS2 -- DataBase Management System Services</dc:creator>
		<pubDate>Sat, 08 Aug 2009 09:18:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-134348</guid>
		<description>[...] which for now seems to mean recognizing which rows are and aren&#8217;t valid under  Netezza&#8217;s form of MVCC (MultiVersion Concurrency [...]</description>
		<content:encoded><![CDATA[<p>[...] which for now seems to mean recognizing which rows are and aren&#8217;t valid under  Netezza&#8217;s form of MVCC (MultiVersion Concurrency [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: asdf</title>
		<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-99315</link>
		<dc:creator>asdf</dc:creator>
		<pubDate>Mon, 13 Oct 2008 20:59:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-99315</guid>
		<description>&quot;A query only returns rows that had been committed before the query began.&quot;
So if transaction A updates a counter (from 0 to 1), and sooner than it manages to commit, transaction B (which started after A) updates the counter again (from 0 to 1), the counter is still 1. Great! But in true ACID the counter would be 2.</description>
		<content:encoded><![CDATA[<p>&#8220;A query only returns rows that had been committed before the query began.&#8221;<br />
So if transaction A updates a counter (from 0 to 1), and sooner than it manages to commit, transaction B (which started after A) updates the counter again (from 0 to 1), the counter is still 1. Great! But in true ACID the counter would be 2.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DBMS2 &#8212; DataBase Management System Services&#187;Blog Archive &#187; Are row-oriented RDBMS obsolete?</title>
		<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-16346</link>
		<dc:creator>DBMS2 &#8212; DataBase Management System Services&#187;Blog Archive &#187; Are row-oriented RDBMS obsolete?</dc:creator>
		<pubDate>Mon, 22 Jan 2007 11:23:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-16346</guid>
		<description>[...] Timestamps are used for inserts and deletes; otherwise, there are no data changes.  (Without that kind of approach, the update strategy in Point #2 couldn’t be viable.) A big benefit to these timestamps is that you can assure integrity via “snapshot isolation”; i.e., by a virtual rollback to a recent point in time. Thus, Vertica can get away without any kind of locks or, for that matter, transaction/redo logs. Row-oriented Netezza uses a similar logless, lockless approach. [...]</description>
		<content:encoded><![CDATA[<p>[...] Timestamps are used for inserts and deletes; otherwise, there are no data changes.  (Without that kind of approach, the update strategy in Point #2 couldn’t be viable.) A big benefit to these timestamps is that you can assure integrity via “snapshot isolation”; i.e., by a virtual rollback to a recent point in time. Thus, Vertica can get away without any kind of locks or, for that matter, transaction/redo logs. Row-oriented Netezza uses a similar logless, lockless approach. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stuart Frost</title>
		<link>http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-12632</link>
		<dc:creator>Stuart Frost</dc:creator>
		<pubDate>Sat, 21 Oct 2006 18:51:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.dbms2.com/2006/09/27/logless-lockless-netezza-more-carefully-explained/#comment-12632</guid>
		<description>Curt,

If I understand this right, there&#039;s no real way to have multiple &#039;transactions&#039; at the same time, which would seem to be a significant limitation if multiple users want to do updates etc. at the same time (which is remarkably common, even in DW systems).

Also, does this mean that an updated row effectively changes position on the disk? If so, how does this affect Netezza&#039;s zone maps? Zone maps only work well in systems that load data in strict date order (thereby providing a kind of date partitioning). If the row order is changed later, the performance benefits of zone maps will degrade over time.

Stuart
DATAllegro</description>
		<content:encoded><![CDATA[<p>Curt,</p>
<p>If I understand this right, there&#8217;s no real way to have multiple &#8216;transactions&#8217; at the same time, which would seem to be a significant limitation if multiple users want to do updates etc. at the same time (which is remarkably common, even in DW systems).</p>
<p>Also, does this mean that an updated row effectively changes position on the disk? If so, how does this affect Netezza&#8217;s zone maps? Zone maps only work well in systems that load data in strict date order (thereby providing a kind of date partitioning). If the row order is changed later, the performance benefits of zone maps will degrade over time.</p>
<p>Stuart<br />
DATAllegro</p>
]]></content:encoded>
	</item>
</channel>
</rss>

