This project is archived and is in readonly mode.
Autogenerated fixture ids too long for some MySQL integer types
-
Andrew White
- Importance changed from to Low
Wouldn't it be easier just to convert the columns to INT? What's the justification for keeping them as SMALLINT - performance difference would be next to nothing and at most you'd save 130KB before you overflowed the id column. I can see the logic of keeping other columns as small as possible if you're dealing with millions of rows but not for the primary key column.
-
Martin Tepper
Well, the justification is that if you reference the primary id from other tables, and if those have a large number of rows, the few bytes per foreign key entry can add up. Especially if you have (multiple) indices on the foreign keys.
This will probably not be a game-changer for one table, but when you are in a tight spot memory-wise on your DB server, you're trying to optimize where you can. -
Andrew White
- State changed from new to open
- Milestone set to 3.1
- Assigned user set to Andrew White
Yep, I can see that would make a difference - go ahead and see if you can fix it.