database connection (open/close) performance -
i've doubts database connections:
- should open , close database every time execute query? (it's every time)
- if i'm downloading json files @ same time, on it's onload function, while i'm running insert querys (some times @ same time), lets 1st insert function done, if close database , 2nd function still inserting data, closing 1st database connection affect 2nd one?
(note these 2 separated functions, running @ same time, depending on onload function , size of json file data)
- if i'm using database connections, what's best approach in order avoid memory leaks , consume less memory?
check here. says, in mobile app, don't use connection pooling. should close connection every time after you're done dealing it. might execute multiple queries @ once. in case, of course keep connection open until executed.
no.
use alloy models. alloy handles best database practices you.
Comments
Post a Comment