+9 votes
by
Good day! I know the question sounds strange, but suppose we have a database with trillions of records, will it function normally and how it will affect the response time from the database?

Thank you in advance!
by
Thank you all for the help! Basically it was planned only data-retrieval operation, as a rule in each line very few of them.
Thanks again!

7 Answers

0 votes
by
 
Best answer
General trillion records 1 byte - this is the terabytes. i.e. here we are talking about a DB with the volume not even in the tens or hundreds of terabytes. Very IMHO - but then to talk about any SQL at all strange. Can be hadoop?
+1 vote
by
Usually that operate on data of this size, there is a division between the application level.
For example, records 1-1m are on one server, data from 1m-2m in another and so on MySQL to handle the job, Facebook job. But JOIN-s You will not be able to do, and for a bunch of Your data, you will need to implement a script server.

Important to understand what types of data will be stored, perhaps for Your tasks, MySQL just does not fit
+3 votes
by
The problem is unlikely to be in the database. Usually everything depends on three things:
1. The queries and optimize them.2. Database configuration and the server itself. Well, properly placed indexes.3. Server resources with the database.
+3 votes
+7 votes
by
Bad solved the issue. Trillion records in one table or one million tables a bit. What operations are mainly to do. What data structure etc. and etc. What facilities have. For such a large number of records is very much to consider. You can fit more something of NoSQL.
0 votes
by
PostgreSQL will ))) MySQL well, maybe in principle, probably, maybe even one index on id for quite a long time to adjust when you insert new records.
by
And what postgre so different that will obviously?)
by
Therapyx : because designed for ahuliard ;D And a trillion just to be nice )))
by
Therapyx : Marketing, probably
by
Therapyx : MySQL is kindergarten simple. And for such a volume to use the kindergarten as something unreasonable. But it is not going into details.
by
But it is not going into details.

The Vedas, the detail is what is interesting... tell me :)
+1 vote
by
If You have a purely theoretical question - then answer without specific implementations))) will Work relatively quickly if you regularly exercise protezirovanie or sharding (read on the Internet, a very useful thing even for a small DB). In short, is the separation of all the database partitions on which the muscle is much easier to work with than one large database. The muscle provides excellent tools for this. Moreover, he determines in which partition the desired data are stored at the time of the request. Also it does not impose absolutely no restrictions in working with joinme and indexes. The only negative is that it must be done manually. Although you can run a simple script on the crown, which would carry about a hundred requests protezirovanija only once a month. Load it almost does not create, but the muscle You will be very thankful that you relieve him of unnecessary work pulling the heavy bases. Sometimes with conjunction with it implemented sharding when automatically creates a new table in the database, when the old have accumulated a certain number of records (usually 10 000), with names table1, table2, table3, etc. In this case, different databases can generally be spread across different servers, but in most cases, due to some subjective factors, its implementation is usually not feasible, so in most cases widely used protezirovanie.
Also, as mentioned earlier - is unknown in what conditions it will use Your database: if requests to add more than reading - you need to use MyISAM, InnoDB otherwise, the difference is noticeable. Much.
...