R
R
ruslannasrutdinov2017-05-05 08:24:24
MySQL
ruslannasrutdinov, 2017-05-05 08:24:24

Is it possible to add fields to a table that uses partitioning and already has data?

The essence of the question is this.
For example, I created a table:

CREATE TABLE tm1 (
s1 CHAR(32)
s2 CHAR(32)
s3 CHAR(32)
placename(32)
) PARTITION BY KEY(placename) PARTITIONS 100;

Filled the table with data. Can I add more columns to the table after that? This is the first.
Second: The table is planned to have several million records. Every 100-200 thousand records will have one placename. Is it appropriate to partition the table by the placename key for these purposes?
Third: Can I, after creating the table, change the number of partitions, i.e. that in an example at creation PARTITIONS 100 is specified?
Fourth: Will it be much faster to process a query for a selection with conditions from a table in which there are about 200 thousand records than from a table in which there are about 5 million records, but partitioning is done, which breaks the entire table into pieces, in which, again, about 200 thousand records?
I have not contacted partitioning before, so I ask for your help in this matter.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question