Subject Re: Since I shouldn't use COUNT....
Author Adam
--- In, "t.s." <truesaint@...> wrote:
> > It just requires a stored procedure to be executed periodically
> > to minimise the number or records to be summed.
> Speaking of which, any consensus on how to best do this ?
> - a cron job / scheduled task ?
> - via event monitors ?
> - a counter and a trigger ? (i.e. execute after counter reaches n)
> - forced during application startup ? (won't work for web apps, though)
> - something else ?

Well I don't see how a counter and a trigger will work without
serialising the inserts. You could use a client program with an event
monitor, however this may not work so well for web-apps.

The easiest way I can see is executing a batch file that launches isql
passing in a simple sql script. The frequency it should be run depends
on the rate of increase in counts.