Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

At the very least you need to read the DB-generated ID, otherwise how do you provide stuff like editing?

Simply reading after a write is a perfectly adequate solution for I'd say most systems.

If you have performance issues and a change like this may solve them, sure. Switch to app-generated IDs and add workarounds for whatever other issues arise, and skip the read. But if you don't need to I don't see why you'd go through this trouble.



> At the very least you need to read the DB-generated ID, otherwise how do you provide stuff like editing?

Most of my career has been with MSSQL, but it can provide that after an insert as a part of the confirmation that the insert was successful.

No explicit separate read required.




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: