[Erp5-dev] Path length

Yoshinori Okuji yo at nexedi.com
Tue Jul 5 01:27:50 CEST 2005


On Monday 04 July 2005 16:14, Romain Courteaud wrote:
> I'm currently playing with a high simulation depth, and I'm encountering
> problem with the catalog.

It was expected when I saw it... :)

> Some of my objects in my test can have a path up to 443 characters, but
> type of columns relative_url and path in the table catalog are
> VARCHAR(255). So, portal catalog does not work very well in this case.
>
> Example:
> /erp5/portal_simulation/37/1_movement_1_2_0/default_transformation_sourcing
>_rule/transformation_source/default_transformation_rule/modified_resource_pi
>quage/default_transformation_sourcing_rule/transformation_source/default_tra
>nsformation_rule/modified_resource_coupage/default_transformation_sourcing_r
>ule/transformation_source/default_transformation_rule/consumed_resource_copy
>_of_2/default_transformation_sourcing_rule/transformation_source

Please think this as just a suggestion. To determine the best solution, you 
must investigate this yourself.

Basically, I am very afraid of a too long URL. Browsers always have a 
limitation of the length of an URL. This is clearly important for security 
for browsers.

Also, a too long URL prevents you from debugging, since it is very boring to 
look at the URL on your browser. This is the same when you look at the 
relational database. Too long things have normally bad effects.

In ERP5, the IDs of documents are merely IDs. They are not meant to be shown 
for human. Well, it is sometimes better to use readable IDs, such 
as /organisation/nexedi instead of /organisation/1213, but this is rare.

If you change relative_url and path in MySQL to TEXT, the performance of 
portal_catalog would be worse, because BLOBs are usually put in another 
table, and this adds an additional overhead of disk access. This is better to 
avoid.

So, IMO, it is better to use much shorter IDs for Simulation Movements and 
Applied Rules, such as just "1", "2", "3". But you know how this system works 
better than me, so you will make a decision.

YO
-- 
Yoshinori Okuji, Nexedi Research Director
Nexedi: Consulting and Development of Free / Open Source Software
http://www.nexedi.com
ERP5: Free / Open Source ERP Software for small and medium companies
http://www.erp5.org
Storever: OpenBrick, WiFi infrastructure, notebooks and servers
http://www.storever.com



More information about the Erp5-dev mailing list