NYCPHP Meetup

NYPHP.org

[nycphp-talk] Saving variable value

Amir Aavani amir.aavani at gmail.com
Tue Jan 10 01:47:11 EST 2006


Yes, your right but consider a web-site with high request rate. Asking query
from database is a time consuming process? and this (asking query for every
request) may cause some error  (too many open connection to database at same
time or ....).

michael wrote:

On Mon, 9 Jan 2006 16:03:16 +0330
Amir Aavani <amir.aavani at gmail.com> <amir.aavani at gmail.com> wrote:

   I developed a web-site which needs to retrieve some data from
database on every request. These data are dynamic and retrieving them
from database take a long time.


If retrieving the the data is what takes a long time then it sounds
like the database may need some tuning, not the app. Indexing is known
to help.  Perhaps a 'datamart' style table would help too.. for example,
summarize the data down to the elements the web is looking for.  This
can be done automagically with procedures/triggers on the underlying
base tables,  with a scheduler in the OS or the DB, or with whatever
routine that runs every 2 hours that updates the data.. The web app
could then call a faster/simpler select.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20060110/47390bcb/attachment.html>


More information about the talk mailing list