Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Duplicate
-
None
-
Not for Release Notes
Description
https://mariadb.com/docs/server/reference/data-types/serial
says serial is an alias for: `BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE`
But it also acknowledges that `This shorthand data type is often used to define primary keys.`
Which means, most people who use `serial` do it like `id SERIAL PRIMARY KEY`
Which means, *Two* separate indexes get created on the same key, most of cases, some sort of id.
Which in turn, eats up space and performance unnecessarily.
I think a good solution would be to remove `unique` off `serial` or replacing it with `primary key` as default. i don't know.
Attachments
Issue Links
- duplicates
-
MDEV-36199 create table with serial primary key - differing result if pk declared separately
-
- Open
-