Subject performance question
Author Olaf Kluge

from the plc I get every cycle of production a record with some information.
Each record (a car) includes 300 Bytes with alphanumeric characters. For
example char1 to char4 is the line number, char 5 to char x the model etc. I
store the information in a firebird 2.5 cs db.

The client (visualization) gives me the information, what fields he want to
see. Either byte 1 to x or fieldname xx or field number x etc. depending on
the realization

Now I have two ideas. I create a table with all fields (separate for each
information) and an import stored procedure fill this table with information
from the long string. (line_number = substring(:str_in from 1 for 4)) etc.

String: 1234A1E2WEWE3432334

Into Field 1 = 1234, Field 2 = A1, Field3..


I made a table with one field and save only the complete string in it. In a
second table I store the information about the field-names and the
start-byte. If the client-visualisation gives me the start-byte, I can get
this information from the one table and disassemble the string from the
other while executing. This method had the advantage, that I can simply and
short change the configuration if the layout of the string was changed.

String: 1234A1E2WEWE3432334 into one field and get the information by
executing the stored procedure.

What can be better (performance, etc.)

Thank you very much.

Best regards.


[Non-text portions of this message have been removed]