mysql - 如何对MySQL分区表的每个分区并行执行sql

标签 mysql partition

有一个分区表A,有4个分区,我想加载数据到表B。

insert into B select * from A partion (p0) where type = 0;
insert into B select * from A partion (p1) where type = 0;
insert into B select * from A partion (p2) where type = 0;
insert into B select * from A partion (p3) where type = 0;

如何并行加载每个分区的数据。仅在一个连接中。

最佳答案

尝试 Apache Spark。

Great Documentation at this link

These options must all be specified if any of them is specified. They describe how to partition the table when reading in parallel from multiple workers. partitionColumn must be a numeric column from the table in question. Notice that lowerBound and upperBound are just used to decide the partition stride, not for filtering the rows in table. So all rows in the table will be partitioned and returned. This option applies only to reading.

关于mysql - 如何对MySQL分区表的每个分区并行执行sql,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41413044/

相关文章:

java - 如何使用坐标显示带有多个按钮的图像;左、上、右、下

mysql - MYSQL(通过连接器/J)是否支持命名参数?

azure - 向 Azure IoT 中心分区发送消息

sql - 如何使用SQL中的casewhen和partitionby将多个值合并为一个值?

mysql 6.5 docker 运行 "unknown flag: --character-set-server"

list - F# - 将列表拆分为奇偶列表元组(按元素,而不是位置)

hadoop - 带分区的 sqoop 配置单元导入

php - 自定义分类 WP_Query

mysql - 如果计数小于数字则获取对象

MySQL When 子句