With MySQL I often overlook some options like 'signed/unsigned' ints and 'allow null' but I'm wondering if these details could slow a web application down.
Are there any notable performance differences in these situations?
- using a low/high range of Integer primary key
- 5000 rows with ids from 1 to 5000
- 5000 rows with ids from 20001 to 25000
- Integer PK incrementing uniformly vs non-uniformly.
- 5000 rows with ids from 1 to 5000
- 5000 rows with ids scattered from 1 to 30000
- Setting an Integer PK as unsigned vs. signed
- example: where the gain in range of unsigned isn't actually needed
- Setting a default value for a field (any type) vs. no default
- example: update a row and all field data is given
- Allow Null vs deny Null
- example: updating a row and all field data is given
I'm using MySQL, but this is more of a general question, thanks.