* Thus wrote Uros Gruber ([EMAIL PROTECTED]):
> Hello!
> 
> I just made some speed tests getting configuration from DB.
> 
> For now I figured 2 ways doing this.
> 
> 1. One value in each row
> 
> 2. using serialize($config) and saving this in one row.
>    $config is predefined array of configuration.
> 
> ...
> Here is result:
> 
> 1st example 0.0478450059891 86.74%
> 2nd example 0.0073139667511 13.26%
> 

IMO, the serialize vs. db rows time is significant (although many
might argue that.)  

I think the biggest draw back is that you loose structure of the
config by realying on just a defined array in php.  Using the db
rows enables an easier interface with adding, changing and removing
values in the config.

I think the best solution would be is to use both of them.  Having
the database structure there for modifications and such. Then use
the serialize method for the website.  So the serialize would be
like a cache of what is actually stored in the db.

HTH,

Curt
-- 
"I used to think I was indecisive, but now I'm not so sure."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to