1 million can I load data into sqlldr faster?

Source: Internet
Author: User

Setp-1 to generate data files:

Getobject. SQL

[SQL]
  1. SELECTA. owner |',"'| A. object_name |'",'| A. object_id |','| To_char (a. created,'Yyyy-mm-dd hh24: mi: ss') |','| A. status
  2. FROMDba_objects ,(SELECTRownum rnFROMDualConnect BYRownum <= 23) B;
Call. SQL

[SQL]
  1. SETEchoOff
  2. SETTermOff
  3. SETLine 100 pages 0
  4. SETFeedbackOff
  5. SETHeadingOff
  6. Spool C: \ Oracle \ script \ ldr_object.csv
  7. @ C: \ oracle \ script \ getobject. SQL
  8. SpoolOff
  9. SETHeadingOn
  10. SETFeedbackOn
  11. SETTermOn
  12. SETEchoOn
Step 0 initialize the environment:

Createobject. SQL

[SQL]
  1. CREATE TABLEObjects (
  2. OwnerVarchar(30 ),
  3. Object_nameVarchar(50 ),
  4. Object_id NUMBER,
  5. CreatedDate,
  6. Status VARCHAR2 (10)
  7. );
  8. CREATE INDEXIdx_obj_owner_nameOnObjects (owner, object_name );
Step 1: import for the first time

Ldr_object.ctl

[SQL]
  1. LoadData
  2. Infile ldr_object.csv
  3. Truncate Into TableObjects
  4. Fields terminatedBy ","Optionally enclosedBy '"'
  5. (
  6. Owner,
  7. Object_name,
  8. Object_id,
  9. CreatedDate 'Yyyy-mm-dd hh24: mi: ss',
  10. Status"Substr (: status, 1, 5 )"
  11. )
C: \ oracle \ script> sqlldr scott/tiger control = ldr_object.ctl errors = 10

Ldr_object.log

[SQL]
  1. SQL * Loader: Release 10.2.0.1.0-ProductionOnFriday January 20 02:16:56 2012
  2. Copyright (c) 1982,200 5, Oracle.AllRights reserved.
  3. Control File: ldr_object.ctl
  4. Data File: ldr_object.csv
  5. Error file: ldr_object.bad
  6. Obsolete file: Not specified
  7. (All records can be discarded)
  8. Number of objects to be loaded:ALL
  9. Number of to be skipped: 0
  10. Allowed error: 10
  11. Bound array: 64 rows, up to 256000 bytes
  12. Continue: Unspecified
  13. Path used: General
  14. Table OBJECTS, loaded from each logical record
  15. Insert option for this tableTRUNCATEEffective
  16. Column name location length abort packaging Data Type
  17. --------------------------------------------------------------------------
  18. OWNERFIRST*, O (")CHARACTER
  19. OBJECT_NAMENEXT*, O (")CHARACTER
  20. OBJECT_IDNEXT*, O (")CHARACTER
  21. CREATEDNEXT*, O (")DATEYyyy-mm-dd hh24: mi: ss
  22. STATUSNEXT*, O (")CHARACTER
  23. Column SQL string:"Substr (: status, 1, 5 )"
  24. Table OBJECTS:
  25. 1033298 rows are loaded successfully.
  26. Zero rows are not loaded due to data errors.
  27. Since allWHENClause failed. 0 rows are not loaded.
  28. Because all fields are empty, 0 rows are not loaded.
  29. Space allocated to the bound array: 82560 bytes (64 rows)
  30. Number of bytes read from the buffer: 1048576
  31. Total number of skipped logical records: 0
  32. Total number of logical records read: 1033298
  33. Total number of rejected logical records: 0
  34. Total number of discarded logical records: 0
  35. Started running from Friday January 20 02:16:56 2012
  36. The operation ended at 02:19:02, January 1, 2012 at on Friday.
  37. Elapsed time: 00: 02: 05.55
  38. CPU time: 00: 00: 10.38
  • 1
  • 2
  • 3
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.