[thesite] friday is a good day..

rudy r937 at interlog.com
Mon May 21 06:45:28 CDT 2001


>> dean, did you put an index on replies.datemod?  i think that would
>> really help this subquery
>
>I didn't before.  I've just added it now.  I have an index on
>replies.contentid which seemed to speed up the original query.

in general, an index on a sequence-generated primary key can only help
speed up joins (and of course queries on individual records)

an index on replies.datemod might speed up queries like

   where datemod > '#DateFormat(session.user.lastlogin)#'

i say "might" because it's not guaranteed, if the inequality is part of a
complex join like the query for the home page, it might ignored

the tradeoff is in updates versus retrievals, and considering how often
comments are added, having another index to update is not going to hurt
us....


rudy





More information about the thesite mailing list