S
S
Sergey Nizhny Novgorod2016-04-02 06:16:04
Django
Sergey Nizhny Novgorod, 2016-04-02 06:16:04

Use pure SQL or ORM in Django?

The question is.
Does Django's built-in ORM work fine, or is it better to use pure SQL to optimize performance?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
U
un1t, 2016-04-02
@un1t

Judging by the formulation of the question, you will have enough speed, but it is important to understand what queries are generated, to be able to use prefetch_related and select_related when necessary.

O
OnYourLips, 2016-04-02
@OnYourLips

To optimize the speed of work, you need to understand how the ORM works and what code it will generate.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question