Answer the question
In order to leave comments, you need to log in
Where is the fastest sorting in python / django of calculated SQL fields? .. Through models or direct SQL queries?
Actually the whole point of the question in subj.
I heard a lot about Django MeetUp about query optimization, and about how crookedly ORM sometimes "draws" all sorts of joins and unions ... I have to use sorting by calculated fields quite intensively, and now I have doubts about the speed of ORM. Who will have recommendations?
The actual task is to find in millions of records (X1, Y1, Z1) the closest to the required ones (X2, Y2, Z2) and build distributions of all these records. Everything is complicated by the fact that X, Y, Z is only part of the data. After a selection is made on them, it will also be necessary to extract the text fields, parse them and sort them again according to some criteria. But the second part of sorting can already be done, incorrectly, using Python tools without any SQL. There will be not millions of records, but a maximum of one or two thousand.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question