News for hackers. Stuff that matters.
Re:What I've Learned After 13 Years of Web Engineering by ams6110 on Saturday August 31, 2013 @10:09PM (#6308822)
Avoid SQL joins in your website code

Disagree. If you need to join data, you have do do it somewhere. You think you are going to do a better job of it than the database engine, which has probably been optimized for years if not decades to do this very thing?

Re:What I've Learned After 13 Years of Web Engineering by argv_empty on Saturday August 31, 2013 @10:23PM (#6308850)
This response is more amusing in light of the author's first claim.
Re:What I've Learned After 13 Years of Web Engineering by toast0 on Saturday August 31, 2013 @11:11PM (#6308973)
It depends on the join.

If you can denormalize your schema so there's no joining, that's great. If you can change the product so there's no joining, great. If the schema and database are designed to do the join you're going to do, that's probably fine.

If not, it's cheaper and easier to add capacity to the pool of shared nothing web machines than to add capacity to the pool of databases machines, so grab the data and run the join on the webserver. (or at least benchmark it; you may be surprised)

Re:What I've Learned After 13 Years of Web Engineering by ColinWright on Saturday August 31, 2013 @10:23PM (#6308849)
I read it this way ...

The lesson is that if you find yourself doing joins, then you need to consider whether the database should be redisgned. A join is sometimes necessary, and the engine is the right place to do it if it must be done, but it's a warning. So if possible, design your DB to avoid joins.

Re:What I've Learned After 13 Years of Web Engineering by RogerL on Saturday August 31, 2013 @11:11PM (#6308971)
The idea is to pay during write, at about any cost, to avoid paying during read. Of course that does not fit all usage cases, so the advise has to be taken with a huge grain of salt.