I have huge amount of polynomials of degree 6 (like x^6 + 2*x^5 + x^4 + x^3 + x^2 + 1
) stored in text files together with some additional info. Total amount is more than 400 000 000
. All of them have integers coefficients.
I would like to efficiently store them and then perform fast search for some polynomial in my store. I don't need multiply clients functionality. I would like to store data and operate with it on same machine.
It seems to me like classical DB tasks. So now I consider some DB as engine for this.
- What DB is the most efficient choice in my case? Is sqlite efficient enough?
- What if the most efficient way for storing polynomials? Table with columns
a0, a1, a2 ... a6, add_info
or some serializing like string serializing"5,3,5,6,1,2,3"
or may be some DB has array data-type? I'm going to make not only exact match search but something like thisget all polynomials with a6 = 3
orget all uniq a5 for polynomials with a6 = 3
.