> For a very high traffic project backed by 20+ DB servers
Slightly OT, but MySQL performance related...

If you are write heavy, there's another issue that I imagine would
bring significant gains on a MyISAM setup of that proportion... and
possibly other databases to a lesser degree (the locking mechanisms
with MyISAM are different).

Basically, right now the ORM will UPDATE or INSERT based off of a
SELECT query it does when you hit save().  So even if the ORM should
already know it's an UPDATE it will run this logic and these queries.

There's "force_update=True" which I imagine would skip the SELECT, but
I was looking into it because the logic here has some other
side-effects as well.

One of the side effects is that if you change a PK, and try to save it
you end up with two rows.  I guess the PK probably shouldn't be
mutable, or we can fix that logic and possible see some gains in
speed.

I have some tests somewhere to try and illustrate how MyISAM locks,
and there might be a couple open tickets relating to side effects...
if there's any interest... kind of waiting until things settle with
the refactor, as I have some ideas I want to try out.

-k

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-develop...@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to