Last active
August 5, 2016 05:20
-
-
Save 64lines/914a1b0d3a2e2f2afe3e to your computer and use it in GitHub Desktop.
This file contains hidden or 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
-- Manual para 200000 inserts | |
BEGIN | |
FOR i IN 1..200000 LOOP | |
INSERT INTO CIUDAD VALUES(i, 'Ciudad ' || i); | |
COMMIT; | |
END LOOP; | |
END; | |
-- Bulk con 20000 inserts (Cargar en memoria y luego cargar en la tabla) | |
DECLARE | |
TYPE tytabla IS TABLE OF CIUDAD%ROWTYPE INDEX BY BINARY_INTEGER; | |
tbCiudad tytabla; | |
BEGIN | |
FOR i IN 1..200000 LOOP | |
tbCiudad(i).id_ciudad := i; | |
tbCiudad(i).nombre_ciudad := 'Ciudad ' || i; | |
END LOOP; | |
FORALL j IN 1..tbCiudad.COUNT | |
INSERT INTO CIUDAD VALUES tbCiudad(j); | |
END; | |
-- Borrar la tabla ciudad | |
TRUNCATE TABLE CIUDAD; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment