Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Oracle vs sybase

RE: Oracle vs sybase

From: Peter McLarty <p.mclarty_at_cqu.edu.au>
Date: Fri, 20 Apr 2007 14:29:37 +1000
Message-ID: <27AA2E9CA7A0C44283BC1E9B00086AA90623EC6B@UNIMAIL.staff.ad.cqu.edu.au>


I remember reading up on it at my last job and thinking it sort of looks nice on the surface, but as you pointed out you could just see a multitude of problems when people started implementing it.

There is a lot of funny little applications around that started as Access and then got a bit big so now have Acess Front Ends that attach to SQLServer, Access sets the Isolation Level to something else. Not sure you can even get Access to use these new modes.

Cheers  

-----Original Message-----
From: Grant Allen [mailto:gxallen_at_gmail.com] Sent: Friday, 20 April 2007 12:32 PM
To: psinger1_at_chartermi.net
Cc: oracle-l_at_freelists.org
Subject: Re: Oracle vs sybase

Phil Singer wrote:
> ryan_gaffuri_at_comcast.net wrote:
>> I met a SQL Server DBA who told me that SQL Server 2005 has something

>> akin to multi-versioning. Does anyone know anything about this? My
>> understanding is that reads no longer block writes. is this true?
>>
>>
>
> I would love to read a discussion of this by someone who really
> understands Oracle and SQL Server 2005. What I have read is strictly
> from the MSFT camp, and it is obvious that whoever wrote it did not
> understand Oracle.
>
> What little I know: SQL Server 2005 has something analogous to
> Oracle's UNDO. It is not turned on by default. It works in a similar

> manner (but the devil is in the details!). Using it appears to exact
> some performance penalties.

Speak of the devil, and he shall appear. Here are some of the (painful) details.

SS2k5 introduces multiversioning by adding two new isolation levels - snapshot isolation and read-committed snapshot isolation. The idea is similar to Oracle's, but the implementation is a hack job in my opinion. Oracle enables its multiversioning by using undo information to be used to reconstruct blocks *if they're required* to present an scn-consistent view of something to a reader (yeah, I'm preaching to the choir here, I know, but the key is Oracle is storing what's needed to reconstruct them if needed, not blindly copying whole rows for no good reason).

SS2k5 is versioning the whole row by storing previous copies in its tempdb, and in the case of triggers, trawling the transaction log to re-materialise the old rows in tempdb. Big problem ... tempdb has enough contention as it is usually, as all sorts, hashes, server-side cursors, etc. already compete for love and attention there. This is akin to combining undo and temporary segments into one storage bucket in Oracle, with all the joy of conflicting workloads ... yuk! Oh, and did I mention the whole row thing? Change your 4-byte char, and your whole varchar(4000) in the same row that you didn't touch is stored away too ... gotta have that whole row! Oracle *may* do this when needed, but my understanding was it's way smarter than that for fixed-length changes to rows/blocks, etc. Microsoft claims the version store (the bit of tempdb used for this) holds old rows only as long as needed, but doesn't detail the algorithm or mechanics, so nothing like undo retention periods, etc.

The contention on tempdb, and the unnecessary store-the-whole-row-without-thinking behaviour are the two big impacts on performance.

Because the feature is presented as an isolation level (rather than as immutable server-wide behaviour), different client connections can have different settings! The behaviour when some clients expect (and need) multiversioning run into clients using other traditional isolation levels is unpredictable ... there have been a few WTF moments already on some mailing lists. Microsoft's solution to this is "ensure all clients use appropriate isolation levels" ... kinda hard when any client can issue a set isolation level command at a whim.

Bah ... that's enough ranting from me. Sounds like a good blog article topic, so I'll go and write more detail about it there.

Ciao
Fuzzy
:-)

--
http://www.freelists.org/webpage/oracle-l


--
http://www.freelists.org/webpage/oracle-l
Received on Thu Apr 19 2007 - 23:29:37 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US