Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

>Sending multiple queries from your web server will likely put more load on the database server than using a stored procedure.

Lots of people seem to not realize that db roundtrips are expensive, and should be avoided whenever possible.

One of the best illustrations of this I've found is in Transaction Processing book by Jim Gray and Andreas Reuters where they illustrate the relative cost of getting data from CPU vs CPU cache vs RAM vs cross host query.



Except for open and writing to files, it's about the heaviest action on a backend server.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: