No announcement yet.

Reducing the lookups in MySQL DB

  • Filter
  • Time
  • Show
Clear All
new posts

  • Reducing the lookups in MySQL DB

    Hello everyone,

    I have the following situation:

    My channel gets a ORU^R01-Message with many OBX-Segment. The values, extracted from every RBX-Segment of the message are used as parameter for a stored procedure, that makes 3 lookups in the DB(collecting values), before writing to a table in the DB.

    The problem is: for every OBX-segment the stored procedure should make 3 lookups before writing to the DB, which is very unefficient.

    Does anyone know how optimize the performance of the whole situation? Is it possible first to collect the values (before the stored procedure executes) and then execute the stored procedure with the collected values as parameter (which only writes some endvalues to the DB)? If I write a javascript programm, that first collects all the values and then calls the stored procedure, will it be a good optimization? (the looping through every OBX-Segment and the calling of the stored procedure for every OBX-Segment remains).

    I appreciate every advice! Thank you,