On Fri, Nov 09, 2001 at 12:46:33AM +0100, Carsten H. Pedersen wrote:
> > > 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.

Jep, but in the end you win speed. ( Or at least: are suppoed to, your
millage will vary, etc)

> > But, it is all explaind in the manual :)
> 
> Exactly where in the manual did you find that piece of information?

5.4.2 Get Your Data as Small as Possible
   One of the most basic optimisation is to get your data (and indexes) to
take as little space on the disk (and in memory) as possible. This can
give huge improvements because disk reads are faster and normally less
main memory will be used. Indexing also takes less resources if done on
smaller columns.
<..>
   * Use the most efficient (smallest) types possible. MySQL has many
specialised types that save disk space and memory.    

But i read the advise literally somewhere. I'm searching......

-- 
                               The Moon is Waning Crescent (44% of Full)
                                           nieuw.nl - 2dehands.nl: 14531

---------------------------------------------------------------------
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

Reply via email to