List:General Discussion« Previous MessageNext Message »
From:Michael Widenius Date:March 17 1999 5:21pm
Subject:Re: configuration question
View as plain text  
>>>>> "Martin" == Martin B Jespersen <Martin@stripped>
> 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
Thread
configuration questionMartin B. Jespersen17 Mar
  • Re: configuration questionChristian Mack17 Mar
  • Re: configuration questionMartin B. Jespersen17 Mar
    • Re: configuration questionMichael Widenius17 Mar