On søn, 2002-04-14 at 16:59, Dain Sundstrom wrote:
> Marius Kotsbak wrote:
> 
> > 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. 
> 
> 
> What?  The IN clause is not needed.  The current code works today.
I know. But when is in neccecary to query with a list of IDs? Caching?

> 
> > And is it required to support BMP (can CMP have
> > relationship with BMP?)?
> 
> 
> No, cmp can't have a relationship with BMP.  The problem is each side 
> needs to inform the other of certain events, and BMPs couldn't do that.
> 
>  
> > 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.
> 
> 
> What?  I do that with relationships, but there is no need to do this 
> with a simple entity load (there is nothing to join with).
ok.

> 
> 
> > This should not be of high priority as it works as it is, but speed is
> > also crucial for many apps.
> 
>  >a
> 
>  > Marius K
>  >
> 
> Speed how.  The only think I have had reported is some lame dbs take 
> longer to parse the query below.
So is this kind of query neccecary? Since it probably is dynamically
generated, wouldn't it benefit less from prepared statement
(precompiling)?

>  I have written a compiler and I tell 
> you there is no reason that the query below should take a long time.
Is there an easy way to enable logging of all sql-code that is actually
executed, so I can see what happens and tune my code?


About this one from SF:

"You have tuned you application for the worst possible 
preformance.  It is doing a readahead, you end the 
transaction, which dumps the data from the cache, and then 
you do it all again."

Does this mean that nothing in the cache is saved for other
transactions?

For many cases this is behavior is good, but often the same data is read
again for other thansactions, for example different users logged in and
are reading the same data. I thought this was some of the advantages of
using CMP instead of plain JDBC-calls.

What is the difference between "on-load" and "on-find"? Isn't on-load
when the CMP is deployed?

Is this the same for read-only CMPs? Isn't the result saved?



Another idee I have is that jbossCMP could tune itself, by logging
access to CMPs, and select the best read-ahead, and field-loading
. Or maybe a special mode (that might be slower), but give advice of
what settings to use in jbosscmp-jdbc after you have runned some common
use cases.

> -dain
> 
> 
> > 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



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

Reply via email to