[AccessD] Number vs text data type

CYNTHIA SPELL CSPELL at jhuccp.org
Mon Oct 13 08:58:28 CDT 2003


This helps me a lot.  Thanks, Lambert!

>>> Lambert.Heenan at AIG.com 10/13/03 09:33AM >>>
No question that numbers will sort faster than text. The CPU was designed to
handle numbers, a 32bit Long Integer is stored in a single register on the
CPU and it's value can very quickly be compare to another 32 bit long in
another register. The compare is all over in a single clock cycle at most.
With strings, each individual byte in the string has to be compared with the
corresponding byte in another string, and this process repeated for the
whole length of the strings. That involves a lot of shuffling of data around
in the cpu.

Lambert

> -----Original Message-----
> From:	CYNTHIA SPELL [SMTP:CSPELL at jhuccp.org] 
> Sent:	Monday, October 13, 2003 7:25 AM
> To:	accessd at databaseadvisors.com 
> Subject:	[AccessD] Number vs text data type
> 
> I inherited a budget number database with the primary key being a 7-digit
> number.  The data type for the field is currently number (long integer).
> Since the field requires no calculation, just some sorting, I'm
> considering changing the data type to text.  The budget number table links
> to quite a few other databases, so I'll have to change the field in other
> places.  Is there a benefit to or problem with using one or the other data
> type?  I remember an instructor once saying that if there's a choice
> between using a text or number type, use number since numbers sort faster
> than text, but I'm not so sure he knew what he was talking about.
> 
> TIA,
> Cindy Spell  
> 
> 
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd 
> Website: http://www.databaseadvisors.com 
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com 
http://databaseadvisors.com/mailman/listinfo/accessd 
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list