Answer the question
In order to leave comments, you need to log in
Why are sqlalchemy queries slow?
There is a request to unload the entire table or its parts for a specified period of time
The keys are set
sqlalchemy unloads data from the database (several thousand rows) seconds 15
While if this request is sent to the sql server using phpmyadmin, the response takes 300ms
At first I thought that sqlalchemy could create a crooked request and output echo requests, copy exactly the request that sqlalchemy generates in phpmyadmin and again 300ms versus 15 seconds in sqlalchemy
I suspect that the whole thing may be in the python itself, maybe inside it packs the response into objects for a long time or something else I
noticed that phpmyadmin unloads the entire database almost instantly, while using sqlalchemy and python it takes me 30 seconds
How can all this be accelerated?
Answer the question
In order to leave comments, you need to log in
Debug your work with sqlalchemy and identify problem areas.
PS just now I saw raspberry in the tags, you should write about this directly in the question. As a possible problematic place, the DBAPI library through which sqlalchemy works with the database.
At first I thought that sqlalchemy could generate a crooked request and echoed requests, copied exactly the request that sqlalchemy generates in phpmyadmin and again 300ms versus 15 seconds in sqlalchemy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question