Posts

Showing posts from April 21, 2019

How to speed up MySQL Insertion of millions of rows?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box; } 0 I want to insert 10 million rows to MySQL table. But it completed in 10 h 12 m 13 s 29 ms. How to speed it up? Here is my SQL USE foo; DROP TABLE IF EXISTS tmp; CREATE TABLE tmp ( id INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, school_id CHAR(4) NOT NULL, student_id CHAR(6) NOT NULL, INDEX school_id(school_id), INDEX student_id(student_id), INDEX school_id_and_student_id(school_id, student_id) ); DROP PROCEDURE IF EXISTS tmpproc; CREATE PROCEDURE tmpproc() BEGIN DECLARE i INT UNSIGNED DEFAULT 0; WHILE i < 10000000 DO INSERT INTO tmp (school_id, student_id) VALUES (SUBSTR(MD5(RAND...

How do I remount a filesystem as read/write?

Image
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0; } 154 59 I'm trying to mount an hfsplus filesystem in a Xubuntu 12.04 VM (kernel version 3.2.0-23-generic) but when I type mount -o remount,rw /dev/sdb3 in command line it returns not mounted or bad option . Any help would be appreciated. mount filesystem share | improve this question edited Aug 15 '18 at 6:29 mook765 4,477 2 13 33 asked Aug 14 '12 at 14:12 ...