At 14:46 14/06/2005, you wrote:

An alternative method is to define a separate table that keeps the COUNT of the rows, and define a trigger that keeps that COUNT updated every time you DELETE/INSERT/UPDATE on the main table.

I actually thought of that as well, but he wants to know how many records match a particular query - not how many are in a particular table. If there are only a few different queries, it might still be doable, but if the number of possible queries is large, it's not really practical.


Paul                            VPOP3 - Internet Email Server/Gateway
[EMAIL PROTECTED]                      http://www.pscs.co.uk/


Reply via email to