How does clustering mysql or another database cluster?

Suppose there is a query "SELECT * FROM table LIMIT 1000000". This query will be very slow. If I make cluster architecture and then the same query will be faster because of the distribution servers or not. If not,what makes the cluster, and whether to rewrite all of the queries after creating the cluster,if you want to rewrite requests for special,what queries to write?
April 7th 20 at 10:46
3 answers
April 7th 20 at 10:48
Solution
Just at the base of clustering, we get the fault tolerance and synchronous replication nodes. Therefore, the record becomes slower. To accelerate further need to set up sharding and participaban. Participaban can be done without the cluster
and synchronous replication nod

By the way I am curious as to what DBMS replication by default it synchronous? - nikita.Schoen45 commented on April 7th 20 at 10:51
@brody.Hamm, from MYSQL for sure, the other can not remember now. In the clouds always a cluster - synchronous and asynchronous replica'red s - Albina_Hill commented on April 7th 20 at 10:54
@carmel, no.
https://dev.mysql.com/doc/refman/8.0/en/replicatio...
Replication enables data from one MySQL database server (the master) to be copied to one or more MySQL database servers (the slaves). Replication is asynchronous by default; slaves do not need to be connected permanently to receive updates from the master


postgresql also synchronous replication is done strictly explicitly. - nikita.Schoen45 commented on April 7th 20 at 10:57
@brody.Hamm, in the topic we're talking about a cluster actually. Read this document about the cluster. The idea of the cluster is that but should be consistent and because there is replication in the cluster - synchronous - Albina_Hill commented on April 7th 20 at 11:00
define "cluster". As I mention in my answer is not a clearly defined concept, probably you put something else in that word.
cold standby of two nodes - it still HA cluster. Be it in synchronous or asynchronous replication - the solution to a specific project. From the word "cluster" is not to be. - nikita.Schoen45 commented on April 7th 20 at 11:03
@brody.Hamm, the cluster is a clear concept from the group of computing resources, distributing the load among themselves. cold standby is not a cluster. Yes, this is a good technique for HA is used regularly, but not the cluster. cold standby also called shadow replica - Albina_Hill commented on April 7th 20 at 11:06
On the English wiki HA cluster - this cluster. Cold standby is a HA cluster. Therefore, cold standby is a cluster.
And your version of the definition, which excludes HA solutions from the concept cluster, with reference to what can you support?

the cluster is a clear concept from the group of computing resources, distributing the load between them

Master + N Barannyk equivalent replica. You cannot be called a cluster? Under the specified description. - nikita.Schoen45 commented on April 7th 20 at 11:09
@brody.Hamm, HA is not a cluster, HA is setup (can be considered a feature), which can be cluster or not to be. Cold standby may not be used for HA, but only for FT or DR. - Albina_Hill commented on April 7th 20 at 11:12
A reference to the cluster definition will?

HA is a setting (can be considered a feature), which can be cluster or not to be

I agree and will not argue with that.
For example, master N and asynchronous replicas. May not be here for HA master and use manual switching. But it is nonetheless a cluster. Right? Or explain why it does not fit your description, which I at the moment definitely can't call clear.

And where of your version of the definition implies synchronous replication? It is exactly the same option.

HA is not a cluster

The cluster collected on the two hosts only for the purposes of the HA method is cold standby is a cluster according to the description in the wiki. - nikita.Schoen45 commented on April 7th 20 at 11:15
April 7th 20 at 10:50
This query will be very slow

Why? Well, unless the table is not a table, and a spreading view.
If the table - read stream of data for DBMS easy way (sorting is not requested, the DBMS will choose a convenient reading order) and helmet to the requester. A simple thing, and if performance is not enough here - it is not a question to the database and its scaling, and application: why it is needed there, this is not a deterministic one million rows from a table.

A cluster is a very common word.
Master replica cold standby cluster
Master replica and hot standby cluster
Master-master cluster
N shard - cluster
Heterogeneous system with two - phase commit is still a cluster

what makes cluster

Wrong asking the question.
First determine why you a headache, for what purpose do you want to add the second server is a DBMS and why you are not the one - then see which direction you need to solve this problem to move.
April 7th 20 at 10:52
Clustering != sharding

Find more questions by tags MySQLPostgreSQLMariaDB