<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Snapshot isolation: SA12 vs PostgreSQL in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaa-p/13831985#M4862828</link>
    <description>&lt;P&gt;See the linked question und Glenn's inevitable sound explanation, SQL Anywhere does also only create copies of the "before state" when an update occurs, not when a row is read.&lt;/P&gt;
&lt;P&gt;Those rows are contained in the temporary file so I don't think you can "select" those explicitly, see the database property "VersionStorePages" for a number of those pages.&lt;/P&gt;
&lt;P&gt;I guess to check the behaviour, you need to have according read transactions that access older vs. newer versions of some rows, see &lt;A href="https://dcx.sap.com/index.html#sqla170/en/html/3bf008006c5f10148260d6d9f549ce48.html"&gt;this simple sample from the docs&lt;/A&gt;.&lt;/P&gt;</description>
    <pubDate>Thu, 11 Aug 2022 11:08:48 GMT</pubDate>
    <dc:creator>VolkerBarth</dc:creator>
    <dc:date>2022-08-11T11:08:48Z</dc:date>
    <item>
      <title>Snapshot isolation: SA12 vs PostgreSQL</title>
      <link>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaq-p/13831983</link>
      <description>&lt;P&gt;Hi all&lt;BR /&gt;
Sa12 (my version is 12.0.1) has 3 snapshot isolation types:&lt;BR /&gt;
 - &lt;EM&gt;snapshot&lt;/EM&gt;&lt;BR /&gt;
 - &lt;EM&gt;statement-snapshot&lt;/EM&gt;&lt;BR /&gt;
 - &lt;EM&gt;readonly-statement-snapshot&lt;/EM&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;My questions are:&lt;BR /&gt;
 &lt;STRONG&gt;1&lt;/STRONG&gt;. Which of these is comparable to PostgreSQL MVCC (by default it use read committed isolation level and read operations &lt;STRONG&gt;ignore&lt;/STRONG&gt; uncommitted and locked rows ...) ?&lt;BR /&gt;
 &lt;STRONG&gt;2&lt;/STRONG&gt;. Where exactly are temporary row informations stored (... to be able to control their occupation and behavior over time ...) ?&lt;BR /&gt;
 &lt;STRONG&gt;3&lt;/STRONG&gt;. Can anyone confirm that all three types are "read committed" isolations (.. since it is set with the same instruction: SET OPTION isolation_level '...') ??&lt;BR /&gt;
 &lt;STRONG&gt;4&lt;/STRONG&gt;. In PostgreSQL, when a row is &lt;STRONG&gt;updated&lt;/STRONG&gt;, a new version of the row is created (-&amp;gt; "isolated") and inserted into the table.&lt;BR /&gt;
In SA12 seems that rows are copied when data are &lt;STRONG&gt;read&lt;/STRONG&gt; (too) ... Is it right ? .. Isn't this strategy more expensive??&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 04:43:49 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaq-p/13831983</guid>
      <dc:creator>former_SQLA_member1694894</dc:creator>
      <dc:date>2022-08-11T04:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: Snapshot isolation: SA12 vs PostgreSQL</title>
      <link>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaa-p/13831984#M4862827</link>
      <description>&lt;P&gt;&lt;A href="https://dcx.sap.com/index.html#sqla170/en/html/3bf0656e6c5f1014bb32fe2f7ce00302.html"&gt;As to the docs&lt;/A&gt; your third question is confirmed:&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;When you use snapshot isolation in a transaction, the database server returns a committed version of the data in response to any read requests. (*)&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Can't comment on the PostgreSQL behaviour but for row versioning details, see &lt;A href="https://sqlanywhere-forum.sap.com/questions/13194/how-does-the-row-versioning-for-snapshot-isolation-work"&gt;my older question here&lt;/A&gt;.&lt;/P&gt;
&lt;HR /&gt;
&lt;P&gt;(*): Unless it's "readonly-statement-snapshot" combined with "read uncommitted" and you are using updatable statements, see &lt;A href="https://dcx.sap.com/index.html#sqla170/en/html/3bf0c5b06c5f1014b6048b9f4a053423.html"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 07:30:43 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaa-p/13831984#M4862827</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2022-08-11T07:30:43Z</dc:date>
    </item>
    <item>
      <title>Re: Snapshot isolation: SA12 vs PostgreSQL</title>
      <link>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaa-p/13831985#M4862828</link>
      <description>&lt;P&gt;See the linked question und Glenn's inevitable sound explanation, SQL Anywhere does also only create copies of the "before state" when an update occurs, not when a row is read.&lt;/P&gt;
&lt;P&gt;Those rows are contained in the temporary file so I don't think you can "select" those explicitly, see the database property "VersionStorePages" for a number of those pages.&lt;/P&gt;
&lt;P&gt;I guess to check the behaviour, you need to have according read transactions that access older vs. newer versions of some rows, see &lt;A href="https://dcx.sap.com/index.html#sqla170/en/html/3bf008006c5f10148260d6d9f549ce48.html"&gt;this simple sample from the docs&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Aug 2022 11:08:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/snapshot-isolation-sa12-vs-postgresql/qaa-p/13831985#M4862828</guid>
      <dc:creator>VolkerBarth</dc:creator>
      <dc:date>2022-08-11T11:08:48Z</dc:date>
    </item>
  </channel>
</rss>

