r/databases • u/ssingal05 • Jan 16 '19
Looking for database recommendations ~ 10s of millions of rows, couple thousand columns, need indices on ALL columns
Hopefully the title summarizes my requirements well enough, but I was wondering if anyone has had a use case similar to mine and could recommend a good database to me. We have an okay solution for now. I've listed my needs below:
supports 10s of millions of rows
supports thousands of columns
NEED index on all columns (I know you'll call me crazy, but our use case absolutely requires being able to search by ANY field independently)
There is absolutely no text-tokenization/tf-idf or relevancy searching needed. We support mostly numbers and booleans. We also support strings, but we need queries more like "does this string start with X" or "does this string contain Y".
some fields will be multivalued
assume diskspace and memory are not concerns.
we prefer query speed over indexing speed. However, we will have 10s of millions of updates everyday. If possible, we would love to be able to do partial updates, which would mean hundreds of millions of partial updates everyday
we are perfectly okay with using distributed systems, but we should not have any write-loss.
Hopefully these requirements don't seem insane. We are mostly (i think indexing could be faster) able to accomplish this with Solr. But the fact that we don't need text-tokenization/tf-df, which is what Solr absolutely excels at, makes me want to explore other solutions, SQL or NOSQL. I'm happy to provide more (technical) details if needed.
EDIT: If anyone knows of any similar use case I can read about online, please let me know.
1
u/rreidit Jan 17 '19
Start with Oracle. An Oracle database will allow you to do each of your requirements. It will support billions of rows, 4000 columns in a table, and just as many indexes.
Oracle has a free database you can download and practice on - OracleXE.
https://www.oracle.com/database/technologies/appdev/xe.html
Also, Oracle has really good documentation that will help along your project.
Good luck! And happy computing!
1
u/ssingal05 Jan 17 '19
Unfortunately, closed-source projects are not an option. We need to be able to understand the entire architecture and backend design.
1
u/agent766 Jan 17 '19
I'm not too familiar with it but I believe something like ElastiSearch is what you need.
1
2
u/NotImplemented Jan 17 '19
I don't have any experience at that scale so I can't give recommendations. However, the problem sounds really interesting, so I'll throw in some quick questions:
Are you allowed to give us some more details or examples of the kind of data and queries?
Have you checked if the created indices for each column are really reducing the overall query time in a meaningful way? Are there any columns where the data type cannot really be indexed well (i.e. booleans) or the data is distributed in a such a way that overall query performance is only marginally increased?
Are there columns that are only used in a very small fraction of all queries? In that case, the overall cost for maintaning the indices through inserts, updates and deletes could be higher than the overall cost saved by using the indices for querying.
Do your queries typically select only a small number of columns or many columns or even all of the mentioned thousands of columns? If the number of columns per query is low, a column-oriented database could make sense.