> > > So then is the real purpose of using varchars, to save disk space? ( I > > > realize this is probably a general database question, just > > trying to learn). > > > > + your datafile will be smaller which saves disk IO. In the end, the extra > > cost of the less efficient index as less than the gain from the faster > > access. So in the end you win speed. > > huh? > > With a variable record length, there's a lot of searching to > get the position of the individual record. With a set size, > the file handler knows exactly where record n is stored in > the file. This has nothing to do with file size -- disks > are random access devices.
=if the column is indexed, then doesn't the index point at the particular block in the data file and the record's exact first-byte position within that block? - in which case there is no 'searching' of records, the index is searched and the corresponding rows retrieved (directly). =if the search is un-indexed (is that a word?) then each record will have to be visited during a SELECT, and much byte-counting as part of the "searching" will surely result. =dn --------------------------------------------------------------------- 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