ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Crum <adri...@hlmksw.com>
Subject Re: Why primary keys are VAR_CHAR type in OFBiz?
Date Tue, 17 Feb 2009 19:48:03 GMT
Again, that depends upon the database, the operating system, and the 
hardware.

If you have an installation that performs better with a different field 
type, then by all means, change your local copy to use a different field 
type.

-Adrian

Sven Wesley wrote:
> Sorry guys, but I don't agree on the first point. An Integer or Number as
> primary will always win the time race compared to a varchar, specially if
> there's a group or order clause included. I do agree about the flexibility
> (that also comes with other complexities), but the performance issue is
> unfortunately not that simple. Of course, it's also a matter of how big your
> database is. The bigger the worse.
> 
> Regards,
> Sven
> 
> 
> 2009/2/17 Jacques Le Roux <jacques.le.roux@les7arts.com>
> 
>> 2d or 3d time this question is asked : time for a FAQ
>>
>> http://docs.ofbiz.org/display/OFBIZ/FAQ+-+Tips+-+Tricks+-+Cookbook+-+HowTo#FAQ-Tips-Tricks-Cookbook-HowTo-WhyprimarykeysareVARCHARtypeinOFBiz
>>
>> Thanks David
>>
>> Jacques
>>
>> From: "David E Jones" <david.jones@hotwaxmedia.com>
>>
>>
>>> 1. The performance overhead is minimal on modern database systems.
>>> 2. Character strings give significant flexibility, especially when it  is
>>> common to migrate data from other systems that have
>>> characters in  their IDs.
>>> 3. Being able to prefix IDs is used in a number of places in OFBiz,
>>>  including prefixes for entire systems when data transfers
>>> between them  are done to separate ID spaces.
>>>
>>> Welcome to the real world! ;)
>>>
>>> -David
>>>
>>>
>>> On Feb 17, 2009, at 8:05 AM, Dhruv Datta wrote:
>>>
>>>  Hello Frns,
>>>>  I am a *newbie* in OFBiz and was playing with the OFBiz.
>>>>
>>>>  During my play I found that in OFBiz data type for all the primary  keys
>>>> are VAR-CHAR, but VAR-CHAR data type is not a good practice for the
>>>> efficiency perspective because it takes extra time during searching.  Can
>>>> anyone please tell me why OFBiz uses VAR-CHAR data type used for  primary
>>>> key
>>>> instead of NUMERIC data type.
>>>>
>>>> Any help would  be greatly appreciated.
>>>>
>>>>
>>>> Dhruv.
>>>>
>>>
>>
> 

Mime
View raw message