News for hackers. Stuff that matters.
Re:Nanosecond timestamp collisions are common by btilly on Friday July 21, 2023 @04:50PM (#36819533)
Disagree on "relatively complex".

    create index on $table ($field1, $field2);
Seems pretty simple to me.
Re:Nanosecond timestamp collisions are common by mattashii on Saturday July 22, 2023 @06:06AM (#36824934)
It is noy just the DDL of the primary table that needs to care about it, but also all foreign keys, DML, queries, APIs accessing the data, etc. Storing that UUIDv7 is likely going to be cheaper than pushing the cost of keeping a composite identity onto other components and systems that work with that data.
Re:Nanosecond timestamp collisions are common by btilly on Saturday July 22, 2023 @12:10PM (#36827424)
Well, that depends on how you manage it. An ORM will find it trivial. Custom SQL, not always so much.

That said, PostgreSQL offers https://www.postgresql.org/docs/current/rowtypes.html which gives you the best of both worlds. A single field which contains 2 fields that can later be extracted. So everywhere you can write a single field for joins, etc. But then when you need it broken out...