G
G
grisbi2015-06-25 11:22:00
linux
grisbi, 2015-06-25 11:22:00

How to properly store data in mongodb?

How to properly organize the architecture of the mongodb database to store a large amount of data?
Suppose now there is a csv file, in which there are about a billion lines, weighing about 500gb and 20 columns.
How to save the data so that you can quickly make the necessary selection for different columns?
I'm going to use ssd, centos 6 64bit, I haven't decided on RAM yet.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
Puma Thailand, 2015-06-25
@opium

you can’t do a quick selection on any columns without indexes,
but with indexes it will work faster even in the same mysql
, why is monga here? what is the profit from it if you have one single insert?

K
Konstantin Kitmanov, 2015-06-25
@k12th

Well at least it is necessary to put down indexes to those columns on which you will do selections.
If we weren't talking about NoSQL, one could also advise to normalize according to different tables, but with mongo this does not make much sense.

R
Roman Mirilaczvili, 2015-06-25
@2ord

MongoDB is suitable for semi-structured data. If the number of columns can vary greatly, then it is better to store the data in a NoSQL database.
However, it is also possible to work with weakly structured data in PostgreSQL .
If there are many relationships between entities, then a database with a document model is not suitable for you - it is better to take a relational database.
And if the data has a graph structure, then in general a graph database .
From slides www.slideshare.net/maxdemarzi/introduction-to-grap...
introduction-to-graph-databases-18-728.jintroduction-to-graph-databases-34-728.j

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question