Hey,

that's a little bit a performance topic.

What do you think is the most effective way to select much data.

I have a JSP based application and normally there is no problem with a sequencial data select. But I was thinking about if it might help to search in huge tables or with complex queries if I use more than one connection at one time. Also possibly use different threads for quering all the information I need.

The background is.
I've a complex structure with a n:m relationship between two tables. And now I have a query that should have a result with all the records from the master table for a given record of the second table. But not only one there can be many of these second creteria connect with and/or operators.

Master (ID, Name) // the result I want
Criterion (ID, ...) // The possible creteria i want to search for


Master2Criterion (ID_Master, ID_Criterion)

If I look for one its easy.
select Master.ID, Master.Name
from Master, Master2Criterion
where Master.ID = Master2Criterion.ID_Master
  and Master2Criterion.ID_Criterion = searchValue

but if you want to search for more than one ...

an other

  and Master2Criterion.ID_Criterion = searchValue2

can of course not work.

Any solution I found as a select is very slow. So I have to look for something to help hsqldb.

Thanks for help

Alex

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Think Network GmbH
eMail: [EMAIL PROTECTED]   Web: http://www.thinknetwork.com

Reply via email to