On Thursday 26 September 2002 11:16 pm, Jeremy Zawodny scribbled something about: > On Thu, Sep 26, 2002 at 11:24:14AM -0700, Gary Traffanstedt wrote: > > sql,query > > > > I have a table that has approximately 40 colums and all but 1 of > > them I have been able to make fixed width. The sole hold out is of > > the type "TEXT" and needs to be able to hold approximately 1000 > > characters. The reason why I want it to be a fixed width field is > > for speed and reliability. From what I have read, if a table has no > > variable width fields, the database can access data faster. > > Right. There's a lot less work involved in locating a random row. > Since you know they're all the same size, it's a matter of > multiplication. No need to check all the row headers. > > > Maybe you can answer a couple of questions for me. First, will > > having all fixed-width fields make a noticeable difference? > > That depends. Can you benchmark it and see, using your real data? > > > Second, is there a field that is fixed-width that can handle > > approximately 1,000 characters or is "TEXT" my only option? > > No. But you could use 4 CHAR(250) columns. Or try and compress the
Thank you very much for your help. zlib was not able to compress my data enough. For english characters it did fine but for Arabic characters it wasn't enough so I tried Compress::Bzip2 and that did the trick. I tested it to 5,000 characters using the highest level of compression and it was able to handle it. Now I'll play with it and turn the compression level down to save a bit on speed. Thanks again!!! -Gary > data to fit it into a 255 byte field (zlib, perhaps). > > Jeremy --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php