Hacker News new | past | comments | ask | show | jobs | submit login

Yup that has been my experience as well - if you read someone's stored procedure it's pretty easy to tell if they're a "relational thinker" or an "imperative thinker." People who embrace an RDBMS will tend to use constructs like CTEs, windows/partitions, set operations, they'll do their conditionals in the projection (i.e w/ CASE statements), they might use a CROSS APPLY to do a transform over a "collection", etc.

Whereas people who are "imperative thinkers," who just treat the database like a giant excel spreadsheet, will use flow control for branches, cursors for iteration, tons of temporary variables, etc. Without fail the iterative thinkers wonder why they need monster CPUs for their DB server and it's always pegging one core. Well of course the query planner can't optimize your code: you told it how to get the data, rather than asking for what data you wanted.




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

Search: