Z
Z
Zakhar Shaikov2017-10-12 22:38:18
Database
Zakhar Shaikov, 2017-10-12 22:38:18

Database flooded with quotes of one currency pair?

Database filled with data for the last 10 years. Number of unique records 500 K
Data: (exact time) - (price).
Date format (2017-10-40-03-00-00-00)
Prices (1000000.00000000)$
Interested in how much it will weigh in megabytes???

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2017-10-19
@Singularnost2045

For a database like MySQL, you can try to roughly estimate:
ID - INT - 4 bytes ... in theory it is possible without this field, but with it it will be easier and more correct, it seems to me ...
Date - Timestamp - 4 bytes
Price - Float - 4 bytes. It seems like a float should be enough for a given accuracy (Range from -3.402823466E+38 to -1.175494351E-38 and from 1.175494351E-38 to 3.402823466E+38)
+ service information, about 5 bytes per entry.
Total one line - about 17 bytes.
500K rows - 17 bytes * 500K = 8500Kbytes = 8.5 MB plus overhead...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question