Does it make any difference if I allocate a particular number of bytes for a varchar? I mean, just as an example, maybe its more efficient to use a power of 2 as the field length. Or maybe power of 2 minus 1. I'm guessing not and that anything less than 255 is the same.

I'm converting some data in a spreadsheet and I have to create a table with about 150 columns. So I created all the columns varchar(255) and now I'm asking mysql to show me the longest value in each column. "SELECT MAX(LENGTH(column99)) FROM TABLE99". Then I've been modifying the "CREATE TABLE" code to accomodate the longest value plus a little more. So if the longest value in the column is 38 characters, I'd probably make that a VARCHAR(50). But maybe I might as well make that 63 or 64. Or maybe I'm wasting my time and should leave them all 255.



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=arch...@jab.org

Reply via email to