Hi,
John Fitzsimons wrote:
> Suppose one has a field that is likely to have no more than 20
> characters in. Would there be any practical difference between
> making it a varchar or one with a limit.
>
> In other words would limiting the field to 200, 100, or 20 be likely
> to make much (any ?) difference ? For example, as an estimate,
> would a 100 limit be twice as fast as a 200 limit ? If only 20
> characters existed.
>
There is a small difference in response time if I understood your
question right. If you set the limits at 0xFF, 0xFFFF or 0xFFFFFF, MySQL
sees that the shorter pointers can be used.
There is an impact but it is very small. The file also gets a bit
smaller the shorter the pointers are.
The highest speed is still achieved with a fixed field length.
Erich