cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Recevier Message type

former_member189441
Active Participant
0 Kudos

Hi

While i am trying to select data from one Table where field = ( array of values from sender ) performence wise which is the best way among the below 2 ways

1) executing multiple statements (means Occurence 1..unbound) in the receiver message type with single occurence key field for each statement.

eg: select field1 from table where filed2 = 1 ( one among the array of input values used as condition to select)

select field1 from table where filed2 = 2

select field1 from table where filed3 = 3

2) executing single statement with mutiple occurence key field mapping all the array values to that key field

eg: select field1 from table where (filed2 = 1 or field2 = 2 or field3 = 3);

Thanks

krish

Accepted Solutions (1)

Accepted Solutions (1)

VijayKonam
Active Contributor
0 Kudos

Run the same queries in the SQL Profiler on your Database and find out the best performing query. Thats the best way to go.

VJ

Answers (2)

Answers (2)

former_member189441
Active Participant
0 Kudos

ok

Former Member
0 Kudos

Hi,

It depends on how your RDBMS processes SQL statements, but I'd go for a single SQL query to retrieve all necessary data (avoids overhead at JDBC - if any - and DB caching/parsing mechanisms) ...

Of course, if you have hundreds or thousands of potential values in your selection clause, a split strategy might be necessary

Rgds

Chris