php-db | 2002091
Date: 09/11/02
- Next message: rainydays_sunshine <email protected>: "[PHP-DB] numeric to word function"
- Previous message: Tony Kuntz: "[PHP-DB] oscommerce"
- Next in thread: Patrick Latour: "Re: [PHP-DB] PreCaching Db into Variables Slows it down?!??"
- Reply: Patrick Latour: "Re: [PHP-DB] PreCaching Db into Variables Slows it down?!??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Grrrrrrr!
Just spent ages (well, 2hours) on a precaching system for my PHP code that
didn't work out!
Hang on, I'll backtrack a bit...
My website is using a php engine that picks at snippets of html from the
database, and builds them up to form the page.
A typical page may use 5 of these html snippets, each at maybe 5kb in size.
I was sat thinking, looking at the debug-timer, and saw that the templates
were one of the more time consuming aspects.
So I said, I know, I'll save the db a bit, and at the start of the script,
read all the templates that I'll need into a global variable, and call them
from that.
Simple, 5 db calls put into 1, and templates taken out of memory.
So why, oh why, has the time taken actually increased??? Does anyone have
sufficient working knowledge of PHP to give me a hint at why this has
happened?
Also, am I right in thinking that as the website hits increase, the db will
be put under increasing pressure, so it serves off better being called only
once instead of 5 times (Even though more data is taken out of it??).
It's late, my eyes are blurring, and I'm annoyed. Very annoyed!
Regards,
Andy
-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
- Next message: rainydays_sunshine <email protected>: "[PHP-DB] numeric to word function"
- Previous message: Tony Kuntz: "[PHP-DB] oscommerce"
- Next in thread: Patrick Latour: "Re: [PHP-DB] PreCaching Db into Variables Slows it down?!??"
- Reply: Patrick Latour: "Re: [PHP-DB] PreCaching Db into Variables Slows it down?!??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

