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

Popular posts from this blog

java - How to set log4j.defaultInitOverride property to false in jboss server 6 -

c - GStreamer 1.0 1.4.5 RTSP Example Server sends 503 Service unavailable -

Using ajax with sonata admin list view pagination -