2 ms·
That'll teach you not to use GUID's for primary keys! :) Use a regular auto incrementing number, starting over at 1 for each story, and you'll have a much easi
by ars 18y ago
That'll teach you not to use GUID's for primary keys! :)
Use a regular auto incrementing number, starting over at 1 for each story, and you'll have a much easier time transitioning software. (Plus you'll save (a little) on bandwidth.)
They only good reason I have ever heard of for using a GUID for a primary key is if you need to merge two databases, the GUID's will not collide.
- jrockway 18y agoNo, that's not the problem. I would have the same problem if I used integer primary keys -- "/comments/4/87/98/293.txt". I would still have to somehow map that old scheme to my new one. (If I used the same storage system for my rewrite, my UUID keys would be fine; no need for integer primary keys.) Additionally, the current version uses an immutable lockless storage system; if I had to increment keys I would have to lock. (The new version will also use UUIDs for the same reason.)