Query in database, not in memory
I work in a startup environment. Sometimes features are developed within 2-3 days. So developers give preference to deadline instead of performance. For past few months, I was compiling a list of code snippets where performance is ignored completely. The common culprit in such code was developers habit to query in memory instead of database. What do I mean by querying in memory? I mean instead of getting result from database, we write code to first get data from DB and then write code to extract result....