DEV Community

dwivedialind
dwivedialind

Posted on

1

File locking vs Row Level Locking

This is a submission for DEV Computer Science Challenge v24.06.12: One Byte Explainer.

Explainer

Have you ever wondered how can multiple users perform DML operations on same table at the same time? Because of row level locking in RDBMS. In RDBMS every row is a file instead of table as a file.
Rows inside a table is scattered (fragmented) all over the DB server HD, to speed up INSERT statement.

Additional Context

Consider a multi-user environment, if multiple users are inserting rows simultaneously into the same table, and if MySQL were to store the rows sequentially then it would be really slow.
That's why when you insert a row into the table, wherever it finds the free space it will store the row there.

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read full post →

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

đź‘‹ Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay