Static Array vs MySQL query

From: John Nichel (jnichel_at_by-tor.com)
Date: 11/29/03


Date: Fri, 28 Nov 2003 17:10:22 -0600
To: PHP List <php-general@lists.php.net>

Hi,

   I'm designing my site to use drop down menus, and am having php
generate the content of the main manus, as well as the sub-menus. What
I'm wondering is what the performance hit will be with putting all the
menu variables into an array in a config file vs storing the info in a
MySQL table, and retriving the data from there. The main menu data is
currently in a config file, and takes up 1.4kb, so I can only assume
that with how many sub-menus that to config it all in a static array,
the filesize is going to be well over 20kb. The data would have to be
read into memory from both the static file, or from the db, so which do
you think would be the fastest and/or least memory intensive? Thanks
for any suggestions.

-- 
By-Tor.com
It's all about the Rush
http://www.by-tor.com