It seems like the reason that the IN-clause is needed, is that jbosscmp
is quering one table at a time. I understand that that might be the
easiest way. And is it required to support BMP (can CMP have
relationship with BMP?)?

Would it be hard/possible to combine the tables that are queried, with
JOIN? I think that would speed up the CMP a lot. It would also reduce
the number of DB-queries.

This should not be of high priority as it works as it is, but speed is
also crucial for many apps.

Marius K

On søn, 2002-04-14 at 04:57, [EMAIL PROTECTED] wrote:
> Bugs item #532734, was opened at 2002-03-20 15:17
> You can respond by visiting: 
> http://sourceforge.net/tracker/?func=detail&atid=376685&aid=532734&group_id=22866
> 
> Category: JBossCMP
> Group: v3.0 Rabbit Hole
> >Status: Closed
> >Resolution: Rejected
> Priority: 5
> Submitted By: Marius Kotsbak (mkotsbak)
> Assigned to: Dain Sundstrom (dsundstrom)
> Summary: Ineffective SQL-code generated
> 
> Initial Comment:
> I found this in the log. It seems like it is generating
> ineffective sql. Wouldn't it be more effective (easier
> for postgresql to parse) by using  possibleValueID IN
> (3,5,6,9, etc) for example?
> 
> It also seems to read repeatly from the base a entity
> bean marked as read only, time-out=0, and read-ahead.
> (it shows generated sql of it several times)
> 
> 2002-03-20 20:11:28,480 DEBUG
> [org.jboss.ejb.plugins.cmp.jdbc.JDBCLoadEntityCommand.PossibleValue]
> Executing SQL: SELECT possibleValueID,stringValue,
> priority FROM PossibleValue WHERE (possibleValueID=?)
> OR (poss
> ibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleV
> alueID=?) OR (possibleValueID=?) OR (possibleValueID=?)
> OR (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueI
> D=?) OR (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) 
> OR (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (p
> ossibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possib
> leValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleValueID=?) OR
> (possibleValueID=?) OR (possibleVal
> ueID=?)
> 
> ----------------------------------------------------------------------
> 
> >Comment By: Dain Sundstrom (dsundstrom)
> Date: 2002-04-13 21:57
> 
> Message:
> Logged In: YES 
> user_id=251431
> 
> I tried changing the read-ahead code to use IN for PKs that 
> map to a single column, but Hypersonic choaked.
> 
> This seems like a db specific optimization, and those are 
> for another version.
> 
> ----------------------------------------------------------------------
> 
> Comment By: Marius Kotsbak (mkotsbak)
> Date: 2002-03-23 04:10
> 
> Message:
> Logged In: YES 
> user_id=366650
> 
> >What happens when there is more then one pk column?
> Do you ask me? In my example, it is just one "long" PK
> column (CMP-beans). I don't think I am using pk-objects in
> this part either.
> 
> To me it looks like jboss is doing some sort of manual
> joining too (wich postgres supports presumably much faster).
> If I had written the sql statements for my example, I
> wouldn't have needed any IN(2,4,6 etc), just JOINing. Also
> this part of my application is slow, even if I try to tune
> it with "on-load", "on-find".
> 
> >Please don't adjust bug priorities.
> I'm sorry. Didn't know I was allowed to do it....
> 
> ----------------------------------------------------------------------
> 
> Comment By: Dain Sundstrom (dsundstrom)
> Date: 2002-03-22 15:44
> 
> Message:
> Logged In: YES 
> user_id=251431
> 
> What happens when there is more then one pk column?
> 
> Please don't adjust bug priorities.
> 
> ----------------------------------------------------------------------
> 
> You can respond by visiting: 
> http://sourceforge.net/tracker/?func=detail&atid=376685&aid=532734&group_id=22866
> 




_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to