DEV Community

Harishma
Harishma

Posted on

1

Sharding vs Partitioning

Hello guys... A small read for you

Imagine there is a giant cake 🎂 (data), if you cut the giant cake and keep each piece 🍰 in separate plates (separate database in separate server) -- this is Sharding

If you just cut the giant cake (data) and keep the pieces 🍰🍰 (tables) in same plate (same database in same server) -- this is Partitioning

Both involves dividing data.

In Sharding, as data can be distributed across multiple servers, you can add more servers (horizontal scaling). Thus improves scalability.

Partitioning is dividing tables within same database and dividing tables improves query performance as less data in table means easy to find the information :)

Ok then, See you in next post. Until then #HappyLearning ;)

Top comments (0)

API Trace View

How I Cut 22.3 Seconds Off an API Call with Sentry

Struggling with slow API calls? Dan Mindru walks through how he used Sentry's new Trace View feature to shave off 22.3 seconds from an API call.

Get a practical walkthrough of how to identify bottlenecks, split tasks into multiple parallel tasks, identify slow AI model calls, and more.

Read more →

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️