This certainly is a fruit of a different kind ;-).

You might want to store the results of the query in a summary table and have that table maintained by a set of triggers on the data table. That way the persistence and the caching is handled by the database, so you don't have to write it yourself.

Queries on this summary table should by quick, and all changes in the data table are immediately available in the summary table.

Sorry for a not very perlish suggestion in this forum.

Raafschild


In reply to Re^3: Architectural question... by raafschild
in thread Architectural question... by devnul

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":