"saraswati.santanu" wrote : Ajay,
| I did not get the first part of your question
|
| anonymous wrote : shouldn't the query actually be performed at the database level
!?!?
|
| The query will be performed at the db only.
|
| Do you mean a db procedure kind of thing? That will have other significant
disadvantages. So that query there looks fine.
|
|
|
Well... what I meant was that instead of querying for everything, loading everything, then
performing a find in java code, shouldn't jBPM be creating a query criteria with the
call that goes to the database? I mean, whats the point of loading everything in memory,
and searching through it... databases are designed for tasks like these...
"saraswati.santanu" wrote :
| About the second part, where the query seems to be fired in a loop - I think the
goal should be to fire less number of queries. Though it appears that the queries are
fired in a loop, but making query in that way actually will result in less number of
queries (in fact no query to db most of the time). If you try to aggregate values and fire
query then cache hit will not be possible most of the time.
I think is some misunderstanding here. I will code at the code again, and comment.
Thanks
Ajay
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4270231#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...