[thesite] friday is a good day..
Joshua OIson
joshua at alphashop.net
Fri May 18 16:01:19 CDT 2001
I think we are in general concurrence. I was not taking into account the
fact that articles can be approved or disapproved--but either way the
article exists. But, the recalculation of rank at the change of status of
each article is a foundationally solid solution. The hit will happen once,
and it *should* keep the result set down to an absolute minimum on front end
queries
I would definitely suggest against using triggers in this case. I'm finding
myself drifting more and more towards Rudy's (c), and Celko's side of the
court on my thoughts about triggers.
> are you suggesting an application scoped variable? i can envision the
logic
> necessary to make that hit as minimal as possible and happen only when
> absolutely necessary.
Application scoped variables was one solution. In this case, you'd store
max(rank) or whatever. If you don't like application scoped variables, a
simple query
SELECT Max(rank) AS max_rank FROM whatever
will be sufficiently fast as well.
-joshua
More information about the thesite
mailing list