'Calculate the memory occupied by a SQLite database theoretically
I have a SQLite table with 370 tables, each table has 14 days including 4am to 8pm data in minutes which constitute a row. Also, each row has 6 fields. When I save my file I get 100KB, but when I calculate it, it becomes almost 1GB (considering each cell is 40 bytes). What am I missing:
My calculation:
days = 14
# 8pm - 4am
hrs = 20-4
m = hrs*60
print(m)
rows = days*m
print(rows)
fields = 6
cells = rows*fields
print(cells)
tables = 370
cells = tables*cells
bs = cells*40
print(bs)
960
13440
80640
1193472000
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
