python - General queries vs detailed queries to database -
python - General queries vs detailed queries to database -
i'm writing web application in python , postgresql. users access lot of info during session. such info (almost) indexed in database. question is, should litter code specific queries, or improve practice query larger chunks of information, cashing it, , letting python process chunk finer pieces?
for example: user inquire entries in payment log. either 1 writes query asking specific entries requested, or 1 collect payment history of user , utilize python select specific entries.
of course of study cashing preferred when working heavy queries, since info indexed, direct database access fast , cashing approach not yield much if speed. there other factors may still render cashing approach preferable?
database designers spend lot of time on caching , optimization. unless nail specific problem, it's improve allow database database stuff, , code rest instead of having code seek take on of database functionality.
python postgresql
Comments
Post a Comment