> I've done a quick non-scientific test. Here's the code:
> ...
> So the default level is indeed faster but I have to confess I'm a lousy
> tester so I encourage anybody to conduct their own experiment.

I appreciate the test case here.  Note that we were in the millions of
queries a day before this became noticeable.  The overhead is a
handful of microseconds on an individual call.  For the average Django
user, I think the error case that Richard ran into is the more
compelling reason.  But certainly performance is also improved.

> Also this observation matches psycopg2 docs[1]:
>
> > `ISOLATION_LEVEL_READ_COMMITTED` This is the default value.  A new
> > transaction is started at the first `.execute()` command on a cursor
> > and at each new `.execute()` after a `.commit()` or a `.rollback()`.
>
> Which conflicts with what 3460 states[2]:
>
> > The difference between autocommit and read committed is that read
> > committed in psycopg2 puts all statements inside a BEGIN/END block
> > (or BEGIN/ROLLBACK or BEGIN/COMMIT).

Ok, I should have been a little more clear here.  If all your
statements are non-transactional (say SELECTs in Django), then my
statement is true.  If Django does a multiple part statement, it will
be inside a single BEGIN/ROLLBACK or BEGIN/COMMIT pair.  However, most
queries from Django are singletons, and singletons are always wrapped
in BEGIN/COMMIT, etc pairs.

Does that make sense now?

jack.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to