当我们通过运行以下命令行来运行70MB的sql文件时:
<div class="container">
<div id="mob_infinite">
$args = array ('post_type' => 'post');
$myquery = new wp_query($args);
if($myquery->have_posts() ){
while($myquery->have_posts() ) : $myquery->the_post();
get_template_part( 'content', get_post_type() );
endwhile;
}
</div>
</div>
运行非常缓慢,最多需要5-10分钟才能完成。
当我们通过php脚本运行相同的.sql文件时,速度要快得多,它会在30秒内完成。
我们运行了MariaDB 10.2.14。
有没有办法加快命令执行速度?