How not to structure database-backed web apps: performance bugs in the wild
Give me an O! Give me an R! Give me an M!What does that spell? SLOW PERFORMANCE!Todays programmers dont understand data. They understand frameworks. To find the nr of all cars that are out of insurance they write:    10 Nr=0
    20 Hey framework, give me all cars!
    Framework: Ok, here are 8001093 business objects representing all the cars in our DB. Each has all the attributes the car has. Color, mileage etc.
    30 Thanks!
    40 Foreach Cars as Car
    50 If Car->insurance_end_date < FancyDateLib.now() Nr++

I see variants of this everywhere. And the performance impact is just untoppable. It's often several million times slower then a simple sql query.But beefy hardware with lots of ram and memory takes care of it. 'Our software is enterprise grade, so of course it cannot run on commodity hardware'.