« first day (1483 days earlier)      last day (1175 days later) » 

8:06 AM
Are there any really good resources on SQL isolation levels?
I've read the most relevant parts of the SQL standard (I think..) and the MySQL and PostgreSQL documentation pages about isolation levels, plus some blog posts about MSSQL isolation levels (since that's what all the blog posts I could find talked about...), plus a few papers and parts of a thesis by now...
And all the papers essentially say that the SQL standard definitions are ambiguous and suggest better ones, but better definitions don't really help in practice if no-one uses them. That said, I don't really want to only look at the documentation from the database I'm currently using, since it'd be nice to be able to design things such that they'd work on any database.
Also, PostgreSQL documentation is like nearly the only place where I've found actual examples of query sequences and the inconsistent results they can cause on different levels.
But since PostgreSQL doesn't have READ UNCOMMITTED at all, there's no examples for that. Also, since (AFAIK) SELECT ... FOR UPDATE isn't standard, there seems to be even less information about how it relates to this. Eg. should it only lock the returned rows or do a predicate lock too.
 
8:40 AM
I mean, I can just reason about a locking implementation or I could just use the documentation for the specific database that I'm using at the moment, but what if I want something to work regardless of the database? Are there any resources that try to sum up what the standard intends and give practical examples of all the things the different levels allow a conforming implementation to do?
 
8:53 AM
And at this point I'm just ranting, but I really can't comprehend why the standard is still using the same definitions, if people have been writing (apparently well respected) papers for 20 years about how the definitions suck. (Well, the latest draft I've read is from 2010, but I somehow highly doubt they've changed it for the latest one...)
 
 
11 hours later…
8:09 PM
@AleksiTorhamo For transactions, I assume (as opposed to user access permissions)?
@AleksiTorhamo my opinion is that it is not practical to write an application of moderate or greater complexity without making concessions to a particular implementation of SQL
Even if you go out of your way to keep your syntax perfectly compliant to SQL99 (or whatever), you'll end up choosing your indexes and writing your queries based on the underlying storage engine
If you want to support multiple database implementations, you'll need real users on each one to keep you honest, plus benchmarks and unit tests for all systems far beyond what most people have, or else you'll end up only supporting the one database that you actually use anyway
I wouldn't expect SQL isolation levels to behave identically across all relational databases. I wouldn't even expect them to behave identically across different MySQL storage engines.
 

« first day (1483 days earlier)      last day (1175 days later) »