httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Qian" <dan...@bestningning.com>
Subject Re: load data at server startup - is ap_hook_post_config() theright place?
Date Sun, 25 Mar 2007 05:31:44 GMT

----- Original Message ----- 
From: "Joachim Zobel" <jzobel@heute-morgen.de>
To: <modules-dev@httpd.apache.org>
Sent: Saturday, March 24, 2007 1:04 PM
Subject: Re: load data at server startup - is ap_hook_post_config() theright 
place?


> Am Donnerstag, den 22.03.2007, 09:21 -0400 schrieb Danie Qian:
>>  I am new to module development but I want to develop a module so I can
>> manage the uri of the thousand of sites more efficiently. What I want is 
>> to
>> load a mysql table data into the memory of Apache server at its startup
>> stage for fast processing of requests later.
>
> This is probably a misconception. If you have a database where you can
> do an indexed lookup loading the table into memory will be _slower_ from
> a certain amount of data on.
>
my database server is a remote box so I think it is slower for every request 
to look up in the database server than a local array or table in memory, 
especially in our case most the pages contain many embedded images which 
means many request per page.


> You can of course implement an index tree in memory, too. But why
> reinvent the database if you already have one.
>

the mysql table has many fields but only a few of them are useful to apache. 
but loading them in memory in advance I can reduce the size and speedup the 
lookup

Thanks,
Daniel 


Mime
View raw message