Re: Buffered Logging?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



You don't mention what database you're using, but mySQL supports memory
based tables.  You can use this to insert your single page loads and then
have a job that periodically inserts in bulk.

Memory based tables:
http://dev.mysql.com/doc/refman/5.0/en/memory-storage-engine.html


Jerry Wilborn
jerrywilborn@xxxxxxxxx


On Fri, Aug 7, 2009 at 5:46 PM, Waynn Lue <waynnlue@xxxxxxxxx> wrote:

> Hey PHPers,
>
> We've been doing sampled logging to the database in our application for
> awhile, and now I'm hoping eventually to blow that out to a larger scale.
> I'm worried about the performance implications of logging to our database
> on
> every single page load, though, so I was wondering if anyone's found a
> solution that does buffered logging.  Essentially it would log to memory
> (memcached/apc/etc), and then periodically dump to a database in a
> structured format, preferrably user-defined.  It's not essential that we
> get
> every signle hit, so I'd be fine if there was some data loss on a restart.
> I started writing my own solution, and then thought I'd ask the list to see
> if anyone has any experience with other tools that do this.
>
> My Google searches around "buffered logging" have mainly found error
> logging
> packages, like PEAR's Log package, or log4php.  Those all seem to write to
> only one particular stream at a time, with no real support for buffering it
> in memory and then moving it to database.
>
> Thanks for any help!
>
> Waynn
>

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux