This is sometimes useful for table locks. When you add a column to the database, the entire table is locked until it is completely overwritten. This has almost no effect if your database has 100 thousand rows. But if you have 100M lines or 1B lines, this is a completely different story ...
It is also useful to avoid dead lines that take up too much space. If you use MVCC and some of your columns are regularly overwritten, sometimes it makes sense to place them in a separate table. The automatic evacuation probably comes in the end, but for the sake of saving work on the hard drive, itβs better to vacuum several int fields in a separate table than a whole bunch of whole lines with text, varchar (n) and who knows what else.
The final reason could be the abuse of select * in ORM. For example, if you are storing images or articles or blog articles, it might be advisable to keep the blob / text field in a separate table. Since every time it loads for one reason or another, your ORM will load the entire line. When you only need the URL of your image or message, the last thing you want is to pull all the binary / text from the database; and yet your ORM will do just that ...
source share