Created
January 9, 2014 11:29
-
-
Save Arakaki/8332744 to your computer and use it in GitHub Desktop.
Batch Insert方法の違いによるパフォーマンスについて
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//複数のレコードを一つのInsert文で投入 | |
INSERT INTO example VALUES | |
(100, 'Name 1', 'Value 1', 'Other 1'), | |
(101, 'Name 2', 'Value 2', 'Other 2'), | |
(102, 'Name 3', 'Value 3', 'Other 3'), | |
(103, 'Name 4', 'Value 4', 'Other 4'); | |
//4つのInsert文を一度のクエリで投入 | |
INSERT INTO example VALUES (100, 'Name 1', 'Value 1', 'Other 1'); | |
INSERT INTO example VALUES (101, 'Name 2', 'Value 2', 'Other 2'); | |
INSERT INTO example VALUES (102, 'Name 3', 'Value 3', 'Other 3'); | |
INSERT INTO example VALUES (103, 'Name 4', 'Value 4', 'Other 4'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment