Re: Static Array vs MySQL query
From: Eric (eric_at_broadpark.no)
Date: 11/29/03
- Previous message: John Nichel: "Static Array vs MySQL query"
- In reply to: John Nichel: "Static Array vs MySQL query"
- Next in thread: - Edwin -: "Re: [PHP] Static Array vs MySQL query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
To: php-general@lists.php.net Date: Sat, 29 Nov 2003 00:34:34 +0100
"John Nichel" <jnichel@by-tor.com> wrote in message
news:3FC7D5DE.3040103@by-tor.com...
> 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
Hi John
A common solution I once found for saving database operation time, was to
store information from the db in some kind of file.
You could for example have a database with all the data, but you run a
special script when there is any updates that updates a include file with
the data.
Under the generation process, you can simply make a script to get the data,
and dynamically make a php file that will be stored.
Eric
- Previous message: John Nichel: "Static Array vs MySQL query"
- In reply to: John Nichel: "Static Array vs MySQL query"
- Next in thread: - Edwin -: "Re: [PHP] Static Array vs MySQL query"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|