Alpha Field Size

View: New views
7 Messages — Rating Filter:   Alert me  

Alpha Field Size

by David Lieb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I recall that in past versions of 4D the number of bytes taken up by an
alpha field was determined by the actual data in the field, not the length
defined in the structure. So there was no size penalty if you declared all
your alphas with the max size, 80 chars.

Am I recalling correctly? And is this true in v11, i.e. no penalty to
declaring all alphas with length 255?

Thanks,

David
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

[[ SPAM ]] Re:Alpha Field Size

by Peter Schumacher-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

David,

in v11 I started using TEXT only (mostly).

Am 04.11.2009 um 21:51 schrieb David Lieb:

> And is this true in v11, i.e. no penalty to
> declaring all alphas with length 255?

Greetings,
[4D-Consulting.com]eK, Wiesbaden (Germany)
Peter Schumacher
--------------------------------------------------------
Web: http://www.4D-Consulting.com/
FreeCall:  0800-434 636 7
Tel.:      +49-611-9406.850 - Fax: +49-611-9406.744
4D-Consulting.com eK - Scharnhorststr. 36 - 65195 Wiesbaden
Member of the German Developer Network  http://www.die4dwerkstatt.de










**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: Alpha Field Size

by Chuck Miller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Depends upon whether 2004 or v11.

If 2004 declaring strings of 80, or 255 takes that amount of memory  
even of the average string length is 10. I know this is true of arrays  
and think it is also true for variables and fields
see page 205 LRM

In v11 all strings are really text.

Regards

Chuck
---------------------------------------------------------------------------
Chuck Miller                          Voice: (617) 739-0306
Informed Solutions, Inc.              Fax: (617) 232-1064
----------------------------------------------------------------------------





On Nov 4, 2009, at 3:51 PM, David Lieb wrote:

> I recall that in past versions of 4D the number of bytes taken up by  
> an
> alpha field was determined by the actual data in the field, not the  
> length
> defined in the structure. So there was no size penalty if you  
> declared all
> your alphas with the max size, 80 chars.
>
> Am I recalling correctly? And is this true in v11, i.e. no penalty to
> declaring all alphas with length 255?
>
> Thanks,

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Parent Message unknown Re: Alpha Field Size

by David Lieb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks. Which version of the Language Ref were you referring to? I couldn't
find a relevant p.205.

David

On Wed, Nov 4, 2009 at 7:50 PM, Chuck Miller wrote:

> Depends upon whether 2004 or v11.
>
> If 2004 declaring strings of 80, or 255 takes that amount of memory
> even of the average string length is 10. I know this is true of arrays
> and think it is also true for variables and fields
> see page 205 LRM
>
> In v11 all strings are really text.
>
> Regards
>
> Chuck
> ...
>
> On Nov 4, 2009, at 3:51 PM, David Lieb wrote:
>
> > I recall that in past versions of 4D the number of bytes taken up by
> > an
> > alpha field was determined by the actual data in the field, not the
> > length
> > defined in the structure. So there was no size penalty if you
> > declared all
> > your alphas with the max size, 80 chars.
> >
> > Am I recalling correctly? And is this true in v11, i.e. no penalty to
> > declaring all alphas with length 255?
>
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: Alpha Field Size

by Jim Dorrance :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sorry, test


--
Jim Dorrance
jim.dorrance@...
www.4d.dorrance.eu
www.dorrance.eu
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Re: Alpha Field Size

by Chuck Miller-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I was in 2004.6 language ref manual. Do search for  Arrays and Memory
------------------------------------------------------------------------------------------------
  Chuck Miller Voice: (617) 739-0306
  Informed Solutions, Inc. Fax: (617) 232-1064
  PO Box 1720 mailto:cjmiller@...
  Brookline, MA 02446 USA Registered 4D Developer
        Providers of 4D and Sybase connectivity
           http://www.informed-solutions.com
------------------------------------------------------------------------------------------------
This message and any attached documents contain information which may  
be confidential, subject to privilege or exempt from disclosure under  
applicable law.  These materials are intended only for the use of the  
intended recipient. If you are not the intended recipient of this  
transmission, you are hereby notified that any distribution,  
disclosure, printing, copying, storage, modification or the taking of  
any action in reliance upon this transmission is strictly prohibited.  
Delivery of this message to any person other than the intended  
recipient shall not compromise or waive such confidentiality,  
privilege or exemption from disclosure as to this communication.



On Nov 5, 2009, at 7:30 AM, David Lieb wrote:

> Thanks. Which version of the Language Ref were you referring to? I  
> couldn't
> find a relevant p.205.

**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************

Parent Message unknown Re: Alpha Field Size

by David Lieb :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Nov 5, 2009 at 12:08 PM, Peter Schumacher wrote:

> David,
>
> in v11 I started using TEXT only (mostly).
>
> Am 04.11.2009 um 21:51 schrieb David Lieb:
>
> > And is this true in v11, i.e. no penalty to
> > declaring all alphas with length 255?
>


Thanks for your input.

I see now from another thread and from exporting the structure definition to
xml that internally Alpha fields have the same type (10) as Text fields
stored in the record. (Type for Text stored outside the record is 14). (Note
for anyone who might be confused as I was, these Types are not the same
numbers as returned by the Type command).

Also, it appears you can now use the ORDER BY editor and ORDER BY command
with Text fields. (No more need to use ORDER BY FORMULA or arrays to just
sort on a text field).

It appears that there's no more need for alpha fields other than to limit
the number of characters to something below 255. Anyone disagree?

Peter, I take it you haven't had any problems with that approach?

David
**********************************************************************
Get the speed and power of 4D v11 SQL
before upgrade prices increase - http://www.4d.com
   

4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4D.com/archives.html
Options: https://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4D_Tech-Unsubscribe@...
**********************************************************************