Friday, December 12, 2014

Re: Seeking for advise on usage MySQL together with MongoDB

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQIcBAEBCAAGBQJUiyucAAoJEC0ft5FqUuEhwN8P/RxXdI5i2g+9w8yFJMI2dz1L
FgUdMkeIQ+lgAQ/eHMo/6f93EI2mK0uOyZDUNkUOZ2DdlEj2bK7n5sJo3X50SLMc
tNodWaZzhVYezc1/869FSCzyPFpqA6qEFea28JafQ8b/AJAbSCnSIf0a9qEcgXcX
5WBoIy6p2fwfi6vdT88SJUwB9JFgd9MvaaaTLUz3xErEmg1KiDhNSBwavMUq3sGJ
3zlepU3GOEwm5SKI7K0KoGVrPY7jFsF3TTJhAhXnVcQXIbf22b7KEBo+UN9lXhM1
OxacFzL4WKLoGAgLNJrQS+U6UMXJxWfLgrjxr+PPlvM/iszkwjtRwddOr/FAai7M
bp5VwEBLQbTzekpxVSUH5EU/DQlDtM2hJGY9tN7w/T1CN397qs7c1iv2t0G6ku+4
V6Xyd3AuGXiOvjERAG4uXWmt/sTlwxd30LZoHcrImoZKUVa88a32AN974vxeiUKl
Cj0ZUR2qPO7fPcI4EztsGrZH38guCm8pSaKRuOtPotzE85+WUO4Q9EA7W/gJozFn
bt/Oo+19UF86EfSy5IdpjrJZCYBzI/czKt5cDE5hDaEfci8gMdRp2i3tE+R2VOqa
eHekuOy7Vb/Lz2wCfWeprrWVlo5Ei9bcS0lOX8QEvkjjZRH4G+mv1PvzjeZQSlQn
uB0b7WCWvdX/fcFIUF4W
=RRoG
-----END PGP SIGNATURE-----
On 12/12/2014 10:42 AM, Collin Anderson wrote:
> Re: the hacker news thread, (sorry for getting a little off topic,) I just
> wanted to mention a few places where we've tried to improve some of those
> things recently:
> - The ORM is still slow, but we've added prefetch_related() and improved
> select_related() which allows you do use fewer queries.

I'm not sure I'd make a general statement that "the ORM is slow" without
seeing further evidence. It'd be interesting to see benchmarks against
something like SQLAlchemy, but I haven't seen that (and a Google search
didn't turn anything up).

As is often the case, how fast the Django ORM is in practice has a lot
more to do with the skill and experience of the person using it than
anything else. You can make any ORM plenty slow if you carelessly code a
bunch of N+1 query situations.

> - We've pulled out some of components into separate projects:
> django-localflavor, django-contrib-comments, django-formtools, and I
> imagine more in the future.
> - You can now use custom user models.
> - We're working on an official public API for the model._meta internals and
> working towards components only using that. It also means it will be easier
> to use non-django models in the admin.
> - We're working on de-coupling django templates, allowing them to be used
> on their own, and making it much easier to use other template engines like
> Jinja2.
> - There's are also quite a lot of people using django-rest-framework for
> creating REST apis, which was one thing the thread said django was not good
> at.

Good list. I think Josh Smeaton's recent expressions refactor in master
should definitely make that list too; it goes a long way towards
addressing Alex's complaints in this talk (linked from the HN thread):
https://speakerdeck.com/alex/why-i-hate-the-django-orm

Also Aymeric's work in 1.6 rebuilding the transaction system from
scratch: Personally, I think Django 1.6+ has a better and clearer
transaction model than SQLAlchemy.

A few years back, I'd have said SQLAlchemy was clearly superior to the
Django ORM. Today, I would not make that claim; having used both a fair
bit, I think they have different strengths.

Carl

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/548B2B9C.1080904%40oddbird.net.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment