Which sucks more

Busy's picture

He has: 6,151 posts

Joined: May 2001

*I bet that got your attention :p*

Seriously, which sucks more resources, included file contents or database queries?

Say for example I was building a forum (which I'm not) it would be built to suit your needs. The user details like site name, font style, colours, images, logo, copyright, page options .... (say 100 options) could either be in a text file via php variables or a database table (one query to get it) which is more server friendly?
This data would be needed on every page.

Or does anyone know how to measure server load via the two? am running apache/mysql/php on xp

They have: 10 posts

Joined: Aug 2006

If the config file is updated very rarely and is not too large then I'd say a text file would be faster. On the other hand, servers have become so fast that any difference between the two is negligible.

-Dotbob.com Limited Time SALE!:
.MOBI $9.98 .ORG $2.99 .IN $13.98 /.EU Only $13.99 / .INFO $2.15 / .ORG $2.99 -Dotbob.com

sublimer's picture

They have: 41 posts

Joined: Aug 2006

i would go with the include file.

i personally think they are easier to maintain.

i try to only use databases when i have a list of content.

-drew
:jump:

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.