Okay here's my problem:
I am writing an application which will log metrics data for a transaction into an ORACLE database. The key data piece we need is a timestamp... for start and stop time. The events, though, sometimes take as little as 10 milliseconds, and Oracle only stores timestamps down to the SECOND. So the way I see it, I have two options:
(1) Use the Date field in the database. Store the start and stop time that way, and ALSO store an integer which is calculated using timeInMillis(). Then the start/stop date field isn't USED in calculating the elapsed time.
(2) Create the timestamp in Java, which would include milliseconds, and insert it into a VARCHAR field. Then, when we pull it out, use Java to add/subtract, etc.
Which of these, in your opinions, is more efficient? Our development team is split...
************
RudeJohn
************
I am writing an application which will log metrics data for a transaction into an ORACLE database. The key data piece we need is a timestamp... for start and stop time. The events, though, sometimes take as little as 10 milliseconds, and Oracle only stores timestamps down to the SECOND. So the way I see it, I have two options:
(1) Use the Date field in the database. Store the start and stop time that way, and ALSO store an integer which is calculated using timeInMillis(). Then the start/stop date field isn't USED in calculating the elapsed time.
(2) Create the timestamp in Java, which would include milliseconds, and insert it into a VARCHAR field. Then, when we pull it out, use Java to add/subtract, etc.
Which of these, in your opinions, is more efficient? Our development team is split...
************
RudeJohn
************