Extended Physics-InformedNeural Networks论文详解

作者

  • Ameya D. Jagtap1,∗ and George Em Karniadakis1,2

期刊

  • Communications in Computational Physics

日期

  • 2020

代码

1 摘要

提出了更灵活分解域的XPINN方法,比cPINN区域分解更灵活,而且使用与所有方程。

2 背景

cPINN是通过区域分解,每个区域使用小的网络进行训练,使得求解时不同区域能够并行计算。论文提出的XPINN具有cPINN的区域分解的优势,同时还有以下优势

  • Generalized space-time domain decomposition,XPINN公式提供了高度不规则的、凸/非凸的时空域分解,由于这样的分解XPINN公式提供了高度不规则的、凸/非凸的时空域分解
  • XPINN公式提供了高度不规则的、凸/非凸的时空域分解
  • 简单中间条件,在XPINN中,对于任意形状的界面来说,界面条件非常简单,不需要法线方向,因此,所提出的方法可以很容易地扩展到任何复杂的几何形状,甚至是更高维度的几何形状。

精确求解复杂的方程组,特别是高维方程组已经成为科学计算的最大挑战之一。XPINN的优点使其成为适合进行此类高维复杂模拟的候选对象,而这个高维模拟通常需要大量的训练成本的。

3 XPINN方法

描述:

  • Subdomains :子域 Ω q , q = 1 , 2 , ⋯ N s d \Omega_{q}, q=1,2, \cdots N_{s d} Ωq,q=1,2,Nsd是整个计算域 Ω \Omega Ω的非重叠子域,满足 Ω = ⋃ q = 1 N s d Ω q \Omega=\bigcup_{q=1}^{N_{s d}} \Omega_{q} Ω=q=1NsdΩq Ω i ∩ Ω j = ∂ Ω i j , i ≠ j \Omega_{i} \cap \Omega_{j}=\partial \Omega_{i j}, i \neq j ΩiΩj=Ωij,i=j表示分解域的个数,子域的相交仅仅是在边界 ∂ Ω i j \partial \Omega_{i j} Ωij
  • Interface :表示两个或者多个子域的共同边界对应的子网(sub-Nets)之间互通
  • sub-Net:子PINN是指每个子域中使用的具有自己的一组优化超参数的个体PINN
  • Interface Conditions: 这些条件用于将分解的子域连接在一起,从而得到完全域上的控制偏微分方程的解,根据控制方程的性质,一个或多个界面条件可以应用在共同界面上,如解连续性、通量连续性等

![image.png](https://img-blog.csdnimg.cn/img_convert/4fdc725110b157da81451d08473b009f.png#align=left&display=inline&height=399&margin=[object Object]&name=image.png&originHeight=797&originWidth=770&size=302982&status=done&style=none&width=385)
上图中X就是求解域,黑色实线表示区域的边界,黑色虚线表示interface。XPINN的基本interface条件包括强形式的连续性条件和在共同interface上强制不同子网给出的平均解。cPINN文中提到,为了稳定性,没有必要加平均解的条件,但实验也表明了会加快收敛速度。XPINN具有cPINN的所有优点,如并行化能力、大的表示能力、优化方法、激活函数、网络深度或宽度等超参数的高效选择。与cPINN不同,XPINN可以用于求解任何类型的偏微分方程,而不一定是守恒定律。在XPINN情况下,采用法向通量连续性条件不需要找到法向。这大大降低了算法的复杂性,特别是在具有复杂领域的大规模问题以及移动界面问题。

q t h q^{t h} qth个子域的神经网络输出定义为
u Θ ~ q ( z ) = N L ( z ; Θ ~ q ) ∈ Ω q , q = 1 , 2 , ⋯   , N s d u_{\tilde{\mathbf{\Theta}}_{q}}(\mathbf{z})=\mathcal{N}^{L}\left(\mathbf{z} ; \tilde{\mathbf{\Theta}}_{q}\right) \in \Omega_{q}, \quad q=1,2, \cdots, N_{s d} uΘ~q(z)=NL(z;Θ~q)Ωq,q=1,2,,Nsd
最终解定义为
u Θ ~ ( z ) = ∑ q = 1 N s d u Θ ~ q ( z ) ⋅ 1 Ω q ( z ) u_{\tilde{\mathbf{\Theta}}}(\mathbf{z})=\sum_{q=1}^{N_{s d}} u_{\tilde{\mathbf{\Theta}}_{q}}(\mathbf{z}) \cdot \mathbb{1}_{\Omega_{q}}(\mathbf{z}) uΘ~(z)=q=1NsduΘ~q(z)1Ωq(z)
其中
1 Ω q ( z ) : = { 0  if  z ∉ Ω q 1  if  z ∈ Ω q \  Common interface in the  q t h  subdomain  1 S  if  z ∈  Common interface in the  q t h  subdomain  \mathbb{1}_{\Omega_{q}}(\mathbf{z}):=\left\{\begin{array}{ll} 0 & \text { if } \mathbf{z} \notin \Omega_{q} \\ 1 & \text { if } \mathbf{z} \in \Omega_{q} \backslash \text { Common interface in the } q^{t h} \text { subdomain } \\ \frac{1}{\mathcal{S}} & \text { if } \mathbf{z} \in \text { Common interface in the } q^{t h} \text { subdomain } \end{array}\right. 1Ωq(z):= 01S1 if z/Ωq if zΩq\ Common interface in the qth subdomain  if z Common interface in the qth subdomain 
S S S表示S表示沿公共界面相交的子域数量

3.1 正、逆问题子域的损失函数

(1)正问题
q t h q^{t h} qth子域的 { x u q ( i ) } i = 1 N u q , { x F q ( i ) } i = 1 N F q  and  { x I q ( i ) } i = 1 N I q \left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}},\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}} \text { and }\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}} {xuq(i)}i=1Nuq,{xFq(i)}i=1NFq and {xIq(i)}i=1NIq表示training, residual, and the common interface points。 N u q , N F q a n d N I q N_{u_{q}}, N_{F_{q}} and N_{I q} Nuq,NFqandNIq分别代表对应的点的个数,每个子域使用一个PINN, u q = u Θ ~ t u_{q}=u_{\tilde{\Theta}_{t}} uq=uΘ~t,第 q t h q^{t h} qth个子域损失函数定义为
J ( Θ ~ q ) = W u q MSE ⁡ u q ( Θ ~ q ; { x u q ( i ) } i = 1 N u q ) + W F q MSE ⁡ F q ( Θ ~ q ; { x F q ( i ) } i = 1 N F q ) + W I q MSE ⁡ u a v g ( Θ ~ q ; { x I q ( i ) } i = 1 N I q ) ⏟ Interface condition  + W I F q MSE ⁡ R ( Θ ~ q ; { x I q ( i ) } i = 1 N I q ) ⏟ Interface condition  +  Additional Interface Condition’s  ⏟ Optional  \begin{aligned} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right)=& W_{u_{q}} \operatorname{MSE}_{u_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}}\right)+W_{\mathcal{F}_{q}} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}}\right) \\ &+W_{I_{q}} \underbrace{\operatorname{MSE}_{u_{a v g}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Interface condition }}+W_{I_{\mathcal{F}_{q}}} \underbrace{\operatorname{MSE}_{\mathcal{R}}\left(\tilde{\boldsymbol{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Interface condition }} \\ &+\underbrace{\text { Additional Interface Condition's }}_{\text {Optional }} \end{aligned} J(Θ~q)=WuqMSEuq(Θ~q;{xuq(i)}i=1Nuq)+WFqMSEFq(Θ~q;{xFq(i)}i=1NFq)+WIqInterface condition  MSEuavg(Θ~q;{xIq(i)}i=1NIq)+WIFqInterface condition  MSER(Θ~q;{xIq(i)}i=1NIq)+Optional   Additional Interface Condition’s 
W u q , W F q , W I F q  and  W I q W_{u_{q}}, W_{\mathcal{F}_{q}}, W_{I_{\mathcal{F}_{q}}} \text { and } W_{I_{q}} Wuq,WFq,WIFq and WIq代表不同损失的参数,
MSE ⁡ u q ( Θ ~ q ; { x u q ( i ) } i = 1 N u q ) = 1 N u q ∑ i = 1 N u q ∣ u ( i ) − u Θ ~ q ( x u q ( i ) ) ∣ 2 MSE ⁡ F q ( Θ ~ q ; { x F q ( i ) } i = 1 N F q ) = 1 N F a ∑ i = 1 N F q ∣ F Θ ~ q ( x F q ( i ) ) ∣ 2 \begin{array}{l} \operatorname{MSE}_{u_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u q}}\right)=\frac{1}{N_{u_{q}}} \sum_{i=1}^{N_{u q}}\left|u^{(i)}-u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{u_{q}}^{(i)}\right)\right|^{2} \\ \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{F_{q}}^{(i)}\right\}_{i=1}^{N_{F q}}\right)=\frac{1}{N_{F_{a}}} \sum_{i=1}^{N_{F q}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{F_{q}}^{(i)}\right)\right|^{2} \end{array} MSEuq(Θ~q;{xuq(i)}i=1Nuq)=Nuq1i=1Nuq u(i)uΘ~q(xuq(i)) 2MSEFq(Θ~q;{xFq(i)}i=1NFq)=NFa1i=1NFq FΘ~q(xFq(i)) 2
MSE ⁡ u a v g ( Θ ~ q ; { x I q ( i ) } i = 1 N I q ) = ∑ ∀ q + ( 1 N I q ∑ i = 1 N I q ∣ u Θ ~ q ( x I q ( i ) ) − { { u Θ ~ q ( x I q ( i ) ) } } ∣ 2 ) MSE ⁡ R ( Θ ~ q ; { x I q ( i ) } i = 1 N I q ) = ∑ ∀ q + ( 1 N I q ∑ i = 1 N I q ∣ F Θ ~ q ( x I q ( i ) ) − F Θ ~ q + ( x I q ( i ) ) ∣ 2 ) \begin{array}{l} \operatorname{MSE}_{u_{a v g}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{I_{q}}}\left|u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\left\{\left\{u_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right\}\right\}\right|^{2}\right) \\ \operatorname{MSE}_{\mathcal{R}}\left(\tilde{\mathbf{\Theta}}_{q} ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{I_{q}}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\mathcal{F}_{\tilde{\Theta}_{q^{+}}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right|^{2}\right) \end{array} MSEuavg(Θ~q;{xIq(i)}i=1NIq)=q+(NIq1i=1NIq uΘ~q(xIq(i)){{uΘ~q(xIq(i))}} 2)MSER(Θ~q;{xIq(i)}i=1NIq)=q+(NIq1i=1NIq FΘ~q(xIq(i))FΘ~q+(xIq(i)) 2)
最后两项代表着interface 条件损失,第四项是在子域 q q q q + q^{+} q+的两个不同网络的残差连续条件, q + q^{+} q+代表 q q q的领域MSER和 M S E u a v g MSE_{uavg} MSEuavg,都定义在所有相邻的子域,上式子中 { { u Θ ~ q } } = u avg  : = u Θ ~ q + u Θ ~ q + 2 \left\{\left\{u_{\tilde{\mathbf{\Theta}}_{q}}\right\}\right\}=u_{\text {avg }}:=\frac{u_{\tilde{\mathbf{\Theta}}_{q}}+u_{\tilde{\mathbf{\Theta}}_{q^{+}}}}{2} {{uΘ~q}}=uavg :=2uΘ~q+uΘ~q+(假设在公共界面上只有两个子域相交),additional interface conditions,例如flux continuity , c k c^{k} ck也能根据PDE的类型以及interface 方向被加损失中。
remark:

  • interface conditions 的类型决定了整个接口的解的正则性,从而影响收敛速度。在interface上的解是足够连续的,从而满足其控制PDE
  • 足够多的interface point去连接子域,这对于算法的收敛很重要,特别是对于internal

对于逆问题:
J ( Θ ~ q , λ ) = W u q MSE ⁡ u q ( Θ ~ q , λ ; { x u q ( i ) } i = 1 N u q ) + W F q MSE ⁡ F q ( Θ ~ q , λ ; { x u q ( i ) } i = 1 N u q ) + W I q { MSE ⁡ u a v g ( Θ ~ q , λ ; { x I q ( i ) } i = 1 N I q ) + MSE ⁡ λ ( θ ~ q , λ ; { x I q ( i ) } i = 1 N I q ) } ⏟ Interface condition’s  + W I F q MSE ⁡ R ( Θ ~ q , λ ; { x I q ( i ) } i = 1 N I q ) ⏟ Intarf  +  Additional Interface Condition’s  ⏟ Optional  \begin{aligned} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}, \lambda\right)=& W_{u_{q}} \operatorname{MSE}_{u_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right)+W_{\mathcal{F}_{q}} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right) \\ &+W_{I_{q}} \underbrace{\left\{\operatorname{MSE}_{u_{a v g}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)+\operatorname{MSE}_{\lambda}\left(\tilde{\boldsymbol{\theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)\right\}}_{\text {Interface condition's }} \\ &+W_{I_{\mathcal{F}_{q}}} \underbrace{\operatorname{MSE}_{\mathcal{R}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)}_{\text {Intarf }}+\underbrace{\text { Additional Interface Condition's }}_{\text {Optional }} \end{aligned} J(Θ~q,λ)=WuqMSEuq(Θ~q,λ;{xuq(i)}i=1Nuq)+WFqMSEFq(Θ~q,λ;{xuq(i)}i=1Nuq)+WIqInterface condition’s  {MSEuavg(Θ~q,λ;{xIq(i)}i=1NIq)+MSEλ(θ~q,λ;{xIq(i)}i=1NIq)}+WIFqIntarf  MSER(Θ~q,λ;{xIq(i)}i=1NIq)+Optional   Additional Interface Condition’s 
其中
MSE ⁡ F q ( Θ ~ q , λ ; { x u q ( i ) } i = 1 N u q ) = 1 N u q ∑ i = 1 N u q ∣ F Θ ~ q ( x u q ( i ) ) ∣ 2 MSE ⁡ λ ( Θ ~ q , λ ; { x I q ( i ) } i = 1 N I q ) = ∑ ∀ q + ( 1 N I q ∑ i = 1 N l q ∣ λ q ( x I q ( i ) ) − λ q + ( x I q ( i ) ) ∣ 2 ) \begin{array}{l} \operatorname{MSE}_{\mathcal{F}_{q}}\left(\tilde{\boldsymbol{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{u_{q}}^{(i)}\right\}_{i=1}^{N_{u_{q}}}\right)=\frac{1}{N_{u_{q}}} \sum_{i=1}^{N_{u_{q}}}\left|\mathcal{F}_{\tilde{\mathbf{\Theta}}_{q}}\left(\mathbf{x}_{u_{q}}^{(i)}\right)\right|^{2} \\ \operatorname{MSE}_{\lambda}\left(\tilde{\mathbf{\Theta}}_{q}, \lambda ;\left\{\mathbf{x}_{I_{q}}^{(i)}\right\}_{i=1}^{N_{I q}}\right)=\sum_{\forall q^{+}}\left(\frac{1}{N_{I_{q}}} \sum_{i=1}^{N_{l q}}\left|\lambda_{q}\left(\mathbf{x}_{I_{q}}^{(i)}\right)-\lambda_{q^{+}}\left(\mathbf{x}_{I_{q}}^{(i)}\right)\right|^{2}\right) \end{array} MSEFq(Θ~q,λ;{xuq(i)}i=1Nuq)=Nuq1i=1Nuq FΘ~q(xuq(i)) 2MSEλ(Θ~q,λ;{xIq(i)}i=1NIq)=q+(NIq1i=1Nlq λq(xIq(i))λq+(xIq(i)) 2)
其他残差损失与正向损失一样。
**Remark:**需要注意的是,由于XPINN损失函数的高度非凸性,定位其全局最小值非常难。但是,对于几个局部极小值,损失函数的值是相似的,相应的预测解的精度是相似的。

3.2 优化方法

自动求导

3.3 误差

E app  q = ∥ u a q − u q e x ∥ E gen  q = ∥ u g q − u a q ∥ E opt  q = ∥ u τ q − u g q ∥ \begin{aligned} \mathcal{E}_{\text {app }} q &=\left\|u_{a_{q}}-u_{q}^{e x}\right\| \\ \mathcal{E}_{\text {gen }} q &=\left\|u_{g_{q}}-u_{a_{q}}\right\| \\ \mathcal{E}_{\text {opt }} q &=\left\|u_{\tau_{q}}-u_{g_{q}}\right\| \end{aligned} Eapp qEgen qEopt q= uaquqex = ugquaq = uτqugq
分别代表approximation error、 generalization error 以及optimization error.

  • u a q = arg ⁡ min ⁡ f ∈ F q ∥ f − u q e x ∥ u_{a_{q}}=\arg \min _{f \in F_{q}}\left\|f-u_{q}^{e x}\right\| uaq=argminfFq fuqex 是真解 u q e x u_{q}^{e x} uqex的近似
  • u g q = arg ⁡ min ⁡ Θ ~ q J ( Θ ~ q ) u_{g_{q}}=\arg \min _{\tilde{\mathbf{\Theta}}_{q}} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right) ugq=argminΘ~qJ(Θ~q)是全局最优解
  • u τ q = arg ⁡ min ⁡ Θ ~ q J ( Θ ~ q ) u_{\tau_{q}}=\arg \min _{\tilde{\mathbf{\Theta}}_{q}} \mathcal{J}\left(\tilde{\mathbf{\Theta}}_{q}\right) uτq=argminΘ~qJ(Θ~q)是子网络训练后得到的解,

最后XPINN的误差可以总结为
E X P I N N : = ∥ u τ − u e x ∥ ≤ ∥ u τ − u g ∥ + ∥ u g − u a ∥ + ∥ u a − u e x ∥ \mathcal{E}_{X P I N N}:=\left\|u_{\tau}-u^{e x}\right\| \leq\left\|u_{\tau}-u_{g}\right\|+\left\|u_{g}-u_{a}\right\|+\left\|u_{a}-u^{e x}\right\| EXPINN:=uτuexuτug+ugua+uauex
其中, ( u e x , u τ , u g , u a ) ( z ) = ∑ q = 1 N s d ( u q e x , u τ q , u g q , u a q ) ( z ) ⋅ 1 Ω q ( z ) \left(u^{e x}, u_{\tau}, u_{g}, u_{a}\right)(\mathbf{z})=\sum_{q=1}^{N_{s d}}\left(u_{q}^{e x}, u_{\tau_{q}}, u_{g_{q}}, u_{a_{q}}\right)(\mathbf{z}) \cdot \mathbb{1}_{\Omega_{q}}(\mathbf{z}) (uex,uτ,ug,ua)(z)=q=1Nsd(uqex,uτq,ugq,uaq)(z)1Ωq(z)

在这里插入图片描述

Remark:

  • 当估计误差降低(数据拟合更好),泛化误差就会增加,这是一种bias variance trade-off,影响泛化误差的两个主要因素是the number and distribution of residual points
  • 优化误差由损失函数的复杂性影响,网络结构深深影响优化误差

3.4 XPINN、cPINN,PINN对比

在这里插入图片描述

与PINN和cPINN框架相比,XPINN框架有很多优点,但是它也有一个与之前的框架相同的局限性。绝对误差
PDE解决方案,不会低于的水平,这是由于解决高维非凸优化问题所涉及的不准确性,可能会导致糟糕的极小值

  • 17
    点赞
  • 25
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
`--extended-insert` 是 `mysqldump` 命令行工具的一个参数,用于生成多行的 `INSERT` 语句,以减少备份文件的大小和提高导入数据的效率。默认情况下,`mysqldump` 会为每一行数据生成一个 `INSERT` 语句,这样会导致备份文件非常大,而且在导入数据时也会变得非常慢。使用 `--extended-insert` 参数可以将多行数据合并成一个 `INSERT` 语句,从而减小备份文件的大小,提高导入数据的效率。 举个例子,假设有一个名为 `test` 的表,其中有 10 条数据,如果不使用 `--extended-insert` 参数,则备份文件中会有 10 条 `INSERT` 语句,如下所示: ``` INSERT INTO test VALUES (1, 'aaa'); INSERT INTO test VALUES (2, 'bbb'); INSERT INTO test VALUES (3, 'ccc'); INSERT INTO test VALUES (4, 'ddd'); INSERT INTO test VALUES (5, 'eee'); INSERT INTO test VALUES (6, 'fff'); INSERT INTO test VALUES (7, 'ggg'); INSERT INTO test VALUES (8, 'hhh'); INSERT INTO test VALUES (9, 'iii'); INSERT INTO test VALUES (10, 'jjj'); ``` 而使用 `--extended-insert` 参数,则备份文件中只有一条 `INSERT` 语句,如下所示: ``` INSERT INTO test VALUES (1, 'aaa'), (2, 'bbb'), (3, 'ccc'), (4, 'ddd'), (5, 'eee'), (6, 'fff'), (7, 'ggg'), (8, 'hhh'), (9, 'iii'), (10, 'jjj'); ``` 可以看到,使用 `--extended-insert` 参数可以将多行数据合并成一个 `INSERT` 语句,从而减小备份文件的大小,提高导入数据的效率。不过,需要注意的是,如果备份的数据量非常大,那么生成的单个 `INSERT` 语句的长度可能会超过 MySQL 服务器的限制,这时需要使用 `--max-allowed-packet` 参数来增加 MySQL 服务器的限制。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

pinn山里娃

原创不易请多多支持

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值