Hi!

I just implemented 1) and commited it to CVS.

 T: Bernie

On Fri, 10 Nov 2000, Bernie Hoeneisen wrote:

> Hi Mike
> 
> Are you going to implement also the other ideas as described in my 
> ealier mail (see below):
> 1) configurable in TurbineResources.properties, whether answerCount is
>    shown at all
> 2) configurable in TurbineResources.properties, whether JOIN or UNION or
>    both are used (both would be as it is implemented now)
> ?
> 
> If not, I might try to implement at least 1).
> 
> I ask this in order to avoid duplicated effort...
> 
>  T: Bernie
> 
> 
> On Fri, 10 Nov 2000, Mike Haberman wrote:
> 
> > done.
> > 
> > it now displays (?) next to questions when the sql fails.
> > 
> > mike
> > 
> > 
> > On Fri, Nov 10, 2000 at 06:10:44PM +0100, Bernie Hoeneisen wrote:
> > > Hi Mike!
> > > 
> > > Cool, that you could solve the issue so fast.
> > > I will have a look and install the new code with MySQL later this
> > > evening (EET :-) ). 
> > > 
> > > I would suggest a solution, where it is possible to disable the whole
> > > answer counting with a setting in TurbineResources.properties.
> > > Reasons:
> > > - performance (in case of lots of questions)
> > > - avoiding confusion, if (0) is shown, in case db doesn't support either
> > >   of the implemented solutions.
> > > 
> > > For performance issues it might also be a good idea to make a
> > > possibility to define the database (or the supportance such as UNION,
> > > OUTER JOIN, ...) in the TurbineResources.properties. Maybe a check if
> > > the existing db-definitions in TurbineResources.properties could be
> > > reused here
> > > 
> > > This statements are based on your email; I haven't had a look on the
> > > source code yet.
> > > 
> > > Have fun!
> > > 
> > >  Bernie
> > > 
> > > 
> > > On Thu, 9 Nov 2000, Mike Haberman wrote:
> > > 
> > > > 
> > > > Hello All,
> > > > 
> > > >     I just commited a patch for DisplayTopics.java.   
> > > > 
> > > >     The whole problem is getting the number of answers for
> > > >     each question.
> > > > 
> > > >     The solution in postgres is to use union selects
> > > >     The solution in mysql is to use left outer joins
> > > >     The default solution would be then to select count(*) from
> > > >     answers where answer.question_id = x (looping over all relevant questions)
> > > > 
> > > >     The patch tries the first one, then the second one, then
> > > >     finally it just returns 0 for each.  I did not implement
> > > >     the last one.  Hopefully, the first two will cover most.
> > > > 
> > > >     The union select statement is SQL92. The left outer join stuff
> > > >     has sql specific syntax for mysql.
> > > > 
> > > >     If someone REALLY REALLY REALLY wants the third one to work as well,
> > > >     I can do it.
> > > > 
> > > > 
> > > >     The good news is that even if your dbase doesn't support either
> > > >     of sql syntax, jyve won't be throwing exceptions at you. 
> > > > 
> > > > 
> > > >     One note:  I haven't tested this under mysql!  (I just copied
> > > >     the old code).  
> > > > 
> > > > 
> > > >     mike
> > > > 
> > > > --
> > > > --------------------------------------------------------------
> > > > To subscribe:        [EMAIL PROTECTED]
> > > > To unsubscribe:      [EMAIL PROTECTED]
> > > > Archives and Other:  <http://java.apache.org/main/mail.html>
> > > > Problems?:           [EMAIL PROTECTED]
> > > > 
> > > > 
> > > 
> > > 
> > > --
> > > --------------------------------------------------------------
> > > To subscribe:        [EMAIL PROTECTED]
> > > To unsubscribe:      [EMAIL PROTECTED]
> > > Archives and Other:  <http://java.apache.org/main/mail.html>
> > > Problems?:           [EMAIL PROTECTED]
> > 
> > --
> > --------------------------------------------------------------
> > To subscribe:        [EMAIL PROTECTED]
> > To unsubscribe:      [EMAIL PROTECTED]
> > Archives and Other:  <http://java.apache.org/main/mail.html>
> > Problems?:           [EMAIL PROTECTED]
> > 
> > 
> 
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> Archives and Other:  <http://java.apache.org/main/mail.html>
> Problems?:           [EMAIL PROTECTED]
> 
> 


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to