4 messages in com.mysql.lists.mysqlRe: configuration question
FromSent OnAttachments
Martin B. Jespersen17 Mar 1999 05:05 
Christian Mack17 Mar 1999 06:54 
Martin B. Jespersen17 Mar 1999 08:01 
Michael Widenius17 Mar 1999 09:20 
Subject:Re: configuration question
From:Michael Widenius (mon@monty.pp.sci.fi)
Date:03/17/1999 09:20:38 AM
List:com.mysql.lists.mysql

"Martin" == Martin B Jespersen <Mar@IconMedialab.dk> writes:

Martin> Christian Mack wrote:

You can only work on byte basis.

Tschau Christian

Martin> Hmm this one might be for monty, not sure:

Martin> Is there any chance that a bittype could be implemented in MySQL e.g.
called Martin> FLAG where length was bit-length? Martin> It is an awfull waste of space to use a byte where you only need a
bit...

To do this, we need get rid of the .frm files (this is where 4.0 will come in :)

In new ISAM I am working on, the interface already has support for keys on bit boundaries. This will make it possible to define a indexed column that takes 3 bits !

Martin> Here i am not only thinking about diskspace but also bandwidth since
mysql Martin> bitwise operators are limited i will have to retrieve the byte and do
bit-math Martin> on it in a serverside scripting language like php and then update the
database Martin> again with the byte. Now if this has to be done all the time it is a Martin> considerable waste of bandwith i would think, please corect me if i am
way off Martin> here.

What kind of bit operators do you need? It 'may' be a good idea to instead create bit functions that work on BLOB:s in MySQL and use these instead! It's quite easy to add new functions to MySQL!

A last note about creating ints:

INT(1) is a 32 bit integer with a display length of 1. (This is according to the ANSI SQL standard)

Regards, Monty