Click here to Skip to main content
15,868,164 members

Comments by Mike V Baker (Top 57 by date)

Mike V Baker 4-Sep-18 9:09am View    
INSERT INTO ComicCharacters (FirstName, LastName) VALUES
("Bugs", "Bunny"),
("Yosemite", "Sam"),
("Elmer", "Fudd"),
("Grape", "Ape");

Start with the INSERT INTO line, then just keep listing the values in parens. When it reaches the batch size you run the cmd, clear it and start over. Use comma between records, semi-colon on the end. 1000 is an arbitrary number I picked so that I could show progress in the program.
Mike V Baker 4-Sep-18 9:08am View    
Deleted
INSERT INTO ComicCharacters (FirstName, LastName) VALUES
("Bugs", "Bunny"),
("Yosemite", "Sam"),
("Elmer", "Fudd"),
("Grape", "Ape");

Start with the INSERT INTO line, then just keep listing the values in parens. When it reaches the batch size you run the cmd, clear it and start over. Use comma between records, semi-colon on the end. 1000 is an arbitrary number I picked so that I could show progress in the program.
Mike V Baker 4-Sep-18 9:05am View    
Be aware that if you do disable the triggers and/or indexes during the operation then you'll need to rebuild the indexes and perform the operations in the triggers to ensure the data is correct.
Mike V Baker 4-Sep-18 9:01am View    
INSERT INTO ComicCharacters (FirstName, LastName) VALUES
("Bugs", "Bunny"),
("Yosemite", "Sam"),
("Elmer", "Fudd"),
("Grape", "Ape");

Start with the INSERT INTO line, then just keep listing the values in parens. When it reaches the batch size you run the cmd, clear it and start over. Use comma between records, semi-colon on the end. 1000 is an arbitrary number I picked so that I could show progress in the program.
Mike V Baker 28-Aug-18 9:09am View    
What I mean is that the cmd will only need to execute 8 queries instead of 8000. Even though each qry has 1000 records it still runs faster than 8000 single record inserts. Perhaps if you posted the SQL that the cmd will run I can show you what I mean