Re: Faster: Includes or DB Queries??
| From: | Richard Lynch | Date: | Mon, 22 Jul 2002 22:45:58 +0000 |
| Subject: | Re: Faster: Includes or DB Queries?? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-108967@lists.php.net to get a copy of this message | ||
>Is there much of a difference in speed or efficiency between INCLUDEing
>files in a script or loading data from a database? I'm building a dynamic
>menu system for a website and not sure if it would be faster to store button
>data in a DB or just do it with Included files.
How fast is your hard drive?
Is the DB on the same box, or one with a 100Mbit Ethernet, or halfway across
the planet?
Do you already *have* a DB connection open?
Assuming a reasonable-speed hard drive, and a one-box PHP/MySQL setup, then
only the last question matters:
If the DB is already "there", it's faster. If not, probably the hard
drive... Maybe.
Test it yourself to be sure with your hardware.
--
Like Music? http://l-i-e.com/artists.htm