[Flask] [flask-sqlalchemy] lazy = True Option

Nitin Jain nitin1.jain at altran.com
Fri Nov 8 21:42:14 EST 2019


Hi all

I am using Flask / flask-sqlalchemy  and postgres DB for web application and currently facing issues w.r.t performance i.e. high cpu / memory  / response time.

We have many tables with one to many relationships  . I have below queries :-


  1.  In terms of performance what is the difference between lazy = True or lazy = dynamic  option.
  2.  As of now at table mapping level ,  loader options are defined . Is  there any reference on how to define at query level . Will  it help to improve the performance  ?
  3.  If we have many level of nesting (parent  - child relationships )  , is it possible to exclude certain relationships selectively ?
  4.  For search  feature , can we setup  index parameter for frequently used columns. If yes , any reference ?

Regards
Nitin

=====================================================
Please refer to https://northamerica.altran.com/email-disclaimer
for important disclosures regarding this electronic communication.
=====================================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/flask/attachments/20191109/aef4380d/attachment.html>


More information about the Flask mailing list