3 ms·
HiLo
by philliphaydon 10y ago
HiLo
- teddyh 10y agoFor those who don’t know what it is: https://vladmihalcea.com/2014/06/23/the-hilo-algorithm/ https://vladmihalcea.com/2014/06/23/the-hilo-algorithm/ Basically, it optimizes for lots of insert operations by using a composite primary key, one of which is a SERIAL assigned by the server, and the other is a value arbitrarily assigned by the client. This allows a client to assign and use many new unique keys without asking the server for a new value for every individual row.