3 ms·
The benefits of having a better type and form constraint is obvious. But you should remember that offloading computation to the DB, especially one that isn't fu
by margorczynski 4y ago
The benefits of having a better type and form constraint is obvious. But you should remember that offloading computation to the DB, especially one that isn't fully distributed like Postgres. Might bite you later down the line.
- oliverrice 4y agowhile you always want to be careful with database load, that generally wouldn't be a concern for user defined types. In the example case, operating on the composite type would be more efficient than the string alternative for the most common operations (sorting, comparing, extracting sub-fields)
- RedShift1 4y agoPlease don't engineer Google scale if you're not Google. A modern server with NVME SSDs can handle a ridiculous amount of transactions (> 1000/s) without breaking the bank. Many LOB apps will run absolutely fine with everything on just one server and all logic inside the database.
- yencabulator 4y agoI'd personally worry much more about the maintainability of this stuff. Testing & version control for in-Postgres things is just plain inferior as a development experience.