TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: How does big apps/platform manage between ORM vs. Stored procedures?

16 pointsby ameyvalmost 4 years ago
I wanted to ask how does big app like (Uber&#x2F;slack) or any other for that matter or platforms like github who use Ruby&#x2F;Python&#x2F;C#&#x2F;Java handle CRUD operations at scale with ORM or Stored procedures.<p>Where do you draw the line when to use SP&#x27;s or ORM? Considering not everyone understands database in depth and can write performant queries or SP&#x27;s.<p>I know its very simple view and probably tons patterns (like CQRS) and infrastructure&#x2F;serverless&#x2F;geo-replicated architecture might be use behind the scene.<p>Have you ever worked on such systems where both ORM and SP&#x27;s are used and how do they keep logic not fragmented at multiple places at scale?<p>TLDR; How highly scalable apps manage DB interactions in code vs handwritten SQL?

2 comments

QueensGambitalmost 4 years ago
When we were building a big app 10 years back, we used ORM for user facing modules and stored procedure for batch processing such as CSV import&#x2F;export. We would clear the ORM cache for every SP run which are usually scheduled at mid-night to avoid stale data.<p>These days, it is graph DB (such as firebase) for user facing module. It syncs data into a warehouse (such as BigQuery) that we use for batch processing.
Graffuralmost 4 years ago
Very interested in the answers. I would guess that most big websites use stored procedures.