@rastinza@qoto.org
I'm not really a db expert, but hey, bytes are cheap.
The tens of millions of rows don't really bother me, db engines can do pretty smart stuff when the data is somewhat uniform.
120 columns now that kinda bothers me. Is really 120 the actual dimension of the basis of the space you're modeling?
And also, any chanche of some of those columns being of a more "archivistic" than "search" interest? If so you might transform those into a ugly string, and if there is some value repetition even catalog and deduplicate lotsadata
@lysander so, the 120 columns is data associated to another entity. It's a 1-1 relationship, I just created a new table to separate the ugly stuff.
It is mainly data storage, but search of some of those columns is expected. Not all those columns will be searched, but it is difficult to say which ones will be useful for search and which ones will not, also because what I'm searching depends on the project at hand.
Actually I expect to add maybe another 100 more...
No data duplication, at least not amongst different rows. Some columns are derived from others, but the computation while not really expensive relies on a bunch of other data external to the database which I don't really want to rely on.
Data is mostly numeric and long bit arrays.
I may get and try to find what is actually useful, but I also want to actually use the DB without spending one year tuning it.
I don't know, I'm generally afraid of databases and don't really know how to work with them: this is the first DB I work on with more than a couple tables.
@lysander let's put it this way: all data can readily be recomputed. I'm storing it to save computation time as computing 100 of those rows takes around one minute and that is not feasible every time I need to filter by one parameter.
@rastinza@qoto.org
Passo all'italiano per comodità, ma se preferisci ritorno all'inglese.
Alla fine è sempre un compromesso tra spazio/tempo di computazione, nel tuo caso direi che ricomputare è decisamente scomodo quindi ci si spinge quanto più sullo spazio. Mi ricorda un pochino i libroni di tabelle di logaritmi/probabilità.
Quando dici che non c'è duplicazione di dati sulle diverse righe, intendi considerando l'insieme di tutte le colonne o anche ogni suo sottoinsieme? Se hai le colonne A, B, C, le righeR1: pippo, 1, dehR2: paper, 2, deh
sono distinte, ma C è uguale in entrambe, e se riesci a individuare un insieme di valori che copre C per tutte le righe (e che sia più piccolo di quello banale), allora invece di scriverci il valore effettivo ci metti un id e sposti il valore su un'altra tabella. Non ti togli di mezzo una colonna ma gli id son piccoli e si impaccano molto bene.
Inoltre, potresti esplorare anche un approcio ibrido, diciamo che hai una colonna di float (funziona anche con le colonne di bitarray ma si complica un pochino) con valori da -100 a +100.
Qual'é la loro distribuzione? Se è ragionevolmente uniforme, e lo è anche quella delle ricerche che andresti a fare, puoi mantenerti un catalogo di bande (diciamo 1:[-100 - -50), 2:[-50 - 0), 3:[0 - 50), 4:[50 - 100]) su cui schiacci i valori effettivi, risparmiando un saaaacco di spazio e quando fai le ricerche prima ti orienti su una banda e poi ti ricomputi le righe interessanti al livello di dettaglio necessario.
Considera anche che lo spazio è costoso sì, ma i db sono efficienti. A meno di necessità particolari, in qualche tera ci stanno miliardi di righe su migliaia di tabelle, e qualche tera è alla portata di quasi chiunque
@lysander @GustavinoBevilacqua sicuro che a seguito di certi calcoli l'identificativo univoco che uso per riferirmi alle molecole mi cambia o qualcosa del genere. Dovrò cercare di renderlo più univoco.
@rastinza @lysander
Uhm…
https://molecolaitalia.it/