POV-Ray : Newsgroups : povray.general : POV Ray newsgroup message digest : Re: POV Ray newsgroup message digest Server Time
31 Jul 2024 10:27:51 EDT (-0400)
  Re: POV Ray newsgroup message digest  
From: Chris Cason
Date: 22 Oct 2007 11:56:23
Message: <471cc827$1@news.povray.org>
Charles C wrote:
> I'll venture the guess that he might've been alluding to the possibility of
> leaving the off-topic group acccessible via the web, but not included in
> the web interface's message digest.  In that case, it would not be the same

Exactly. It's not as simple as it sounds, since the digest was simply the
most recent 100 rows in the message table, retrieved with the following query:

  SELECT * from messages ORDER BY id DESC LIMIT 0,100

Note that the message table does *not* contain any group ID. It has never
been necessary. And apart from that, there is not necessarily a 1-1
relationship between a message and a group (i.e. a single message may be
posted in multiple groups simultaneously, at least if you are using the NNTP
interface).

Therefore there is no direct way (from the message table alone) to tell if a
given message is in a particular group. We must also query the threads table.
That said, while I'm not particularly familiar with SQL, it wasn't too hard
to do. This new query is now in place:

  SELECT * from messages,threads
    WHERE messages.id=threads.messageid AND threads.groupid<>41
    ORDER BY messages.id DESC LIMIT 0,100

which to the credit of mysql executes in about 5 milliseconds.

-- Chris


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.