Lookout

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing Text vs. numeric to historical database

Can anyone tell me the the difference in size of the data that will be written to the histroical database by using text vs. numeric?
Logging text to the database seems to generate greatly larger amounts of data.
0 Kudos
Message 1 of 3
(3,199 Views)
numeric data requires from 1 to 9 bytes per value, depending on the precision.
A text value I believe requires more. Each character needs one byte, and a whole string needs some bytes for string length. We also use some bytes for timestamp of each value.
So, in most cases, you are right.
Ryan Shi
National Instruments
0 Kudos
Message 2 of 3
(3,181 Views)

Ryan thanks for answering.

We are seeing a dramatic decrease in data logging with Text vs. numeric.

I have some sreens that are logging numbers as text.

The size of the database file varied form using 1k per minute with the text to 1k per hour without.

This is logging less than 50 points of data all are 3 digits and 2 decimals.

from your answer there doesn't seem that text should take up that much more space than a numeric.

Was wondering if there was some other reason

0 Kudos
Message 3 of 3
(3,174 Views)