http://www.perlmonks.org?node_id=472663


in reply to Re^3: Architectural question...
in thread Architectural question...

Its starting to drive me bananas... (sorry, I could not resist)

The problem with storing it using triggers/materialized views is that the "where" clause against the data table is not constant. Sometimes I am searching the data table for records in a state, zip code radius, full-text search (using tsearch2), and about 3 other factors. So the "grouping" has to happen *AFTER* the result set is limited by the WHERE clause against the data table.

.. I hope I explained that well enough...

- dEvNuL