
Domain Logic and SQL - kgthegreat
https://martinfowler.com/articles/dblogic.html
======
kgthegreat
'One of the first questions people consider with this kind of thing is
performance. Personally I don't think performance should be the first
question. My philosophy is that most of the time you should focus on writing
maintainable code. Then use a profiler to identify hot spots and then replace
only those hot spots with faster but less clear code'

------
kgthegreat
Another article on the same: [http://www.vertabelo.com/blog/notes-from-the-
lab/business-lo...](http://www.vertabelo.com/blog/notes-from-the-lab/business-
logic-in-the-database-yes-or-no-it-depends)

------
kgthegreat
'multi-user scenarios often cause surprising changes to the way queries
behave, so real profiling has to be done under a realistic multi-user load.
You may find that locking issues outweigh anything you can get by faster
individual queries.'

