| 
	
 | 
 Posted by Jerry Stuckle on 05/04/06 15:39 
Ben Holness wrote: 
>>However, for only 500 items I'd say just use the varchar.  As Toby said, if you  
>>index this column (automatic if it's the primary key), it should be very fast. 
>  
>  
> Based on the first email, I will choose int or enum. I am looking to 
> squeeze as much efficiency as possible out of the hardware :) I will be 
> happy shaving off 2 microseconds of cpu processing time. 
>  
> So which do you think takes the least processor time - PHP looking up a 
> value in an array or MySQL converting enum to int? ;) 
>  
> Cheers, 
>  
> Ben 
 
Shouldn't be much difference either way. 
 
And I'd still use varchar.  The extra processing required to fetch an int id or  
the extra work involved with defining SET values just isn't worth it for a 500  
row table.  500K rows, yes. 
 
And if you're pushing your hardware that hard that you either need to get  
more/better hardware or build your pages in a compiled language such as C and  
have a huge amount of memory for caching.  Even reading the page from the disk  
will take more than 2 microseconds. 
 
 
 
--  
================== 
Remove the "x" from my email address 
Jerry Stuckle 
JDS Computer Training Corp. 
jstucklex@attglobal.net 
==================
 
  
Navigation:
[Reply to this message] 
 |