General database query.

General database query.

am 05.12.2004 23:04:58 von johnf

Suppose one has a field that is likely to have no more than 20
characters in. Would there be any practical difference between=20
making it a varchar or one with a limit.=20

In other words would limiting the field to 200, 100, or 20 be likely
to make much (any ?) difference ? For example, as an estimate,=20
would a 100 limit be twice as fast as a 200 limit ? If only 20
characters existed.

Regards, John.
=20

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: General database query.

am 06.12.2004 01:36:44 von oceanare pte ltd

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

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org