[AccessD] Hit the Wall?

John W. Colby jwcolby at colbyconsulting.com
Sun Jul 25 21:51:00 CDT 2004


Either way, the savings are substantial, both in storage and in speed.  

John W. Colby
www.ColbyConsulting.com 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Sunday, July 25, 2004 10:19 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Hit the Wall?


maybe, I always thought yes/no were 1 byte on the disk......hmmmmm.

Drew

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of John W. Colby
Sent: Sunday, July 25, 2004 9:11 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Hit the Wall?


I second that!  If you have a lot of booleans, store them in a long, 31
booleans / long integer (avoid the math fun!).

With a small module to handle the setting / clearing / reading of a bit you
are off and running.  MUCH less storage that using actual booleans (which I
always thought were stored in one bit of a 16 bit value).

JWC

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of DWUTKA at marlow.com
Sent: Sunday, July 25, 2004 9:45 PM
To: accessd at databaseadvisors.com
Subject: RE: [AccessD] Hit the Wall?


Dan, if you have a lot of yes no fields, you may be able to stick with just
one table!  Instead if using yes/no fields (which take a byte each), I would
go with merging the yes/no fields into a long, or byte field.  With a byte
field, you can get 8 yes/no fields in one field.  With a Long, you can get
31 (32, if you want to have a little math fun).  Use bit comparison for the
yes/no fields.

ie, if a field has 3 as a value, that means that 1 and 2 are turned on, and
nothing else.

So whatever 'value' is represented by 1 can be checked with:

rs.("MyField").value AND 1

Drew





More information about the AccessD mailing list