Quantcast
Channel: Question and Answer » oracle
Viewing all articles
Browse latest Browse all 717

what's the fastest method to export a table through sql query ? 11g – performance

$
0
0

I’m connected to the oracle server remotely. I need to export a table data(the whole table) with millions of records but due the hosting restrictions I can only use SQL (no exp , expdp) . Therefore I’m wondering what’s the sql query that with the best performance. My table structure is as following :

  CREATE TABLE "AUTO"."AUTO" 
   (    
    "AUTOJ" NUMBER(16,0), 
    "AUTOK" NUMBER(5,0), 
    "AUTOL" NUMBER(38,0), 
    "AUTOM" NUMBER(4,0), 
    "AUTON" NUMBER(4,0), 
"AUTOZ" NUMBER(8,0), 
    "AUTOAA" NUMBER(32,0), 
    "AUTOBB" NUMBER(38,0), 
    "AUTOBC" NUMBER(38,0), 
    "AUTOBD" NUMBER(38,0), 
    "AUTOBW" DATE, 

    "V" NUMBER(32,0), 
    "AUTOT" VARCHAR2(128), 
    "AUTOU" NUMBER(10,0), 
"MK" NUMBER(38,0), 
    "ID" NUMBER(38,0) NOT NULL ENABLE, 
    "AUTOA" VARCHAR2(64) NOT NULL ENABLE, 
    "AUTOB" NUMBER(38,0) NOT NULL ENABLE, 
    "AUTOC" VARCHAR2(68), 
    "AUTOD" VARCHAR2(64), 
    "AUTOE" DATE NOT NULL ENABLE, 
    "AUTOF" DATE, 
    "AUTOG" NUMBER(16,0), 
    "AUTOH" VARCHAR2(128) NOT NULL ENABLE, 
    "AUTOI" NUMBER(10,0), 
    "AUTOW" NUMBER(10,0), 
    "AUTOX" NUMBER(15,2), 
    "AUTOY" NUMBER(15,2), 

    "AUTOMK" DATE, 
    "AUTOPO" VARCHAR2(128), 
    "AUTOCV" NUMBER(10,0), 
    "AUTOON" NUMBER(10,0), 
    "AUTOXA" NUMBER(1,0),
"AUTOBY" NUMBER(8,0), 
    "AUTOCC" NUMBER(38,0), 
    "AUTODA" DATE, 
    "AUTOO" NUMBER(3,0), 
    "AUTOP" VARCHAR2(1), 
    "AUTOR" NUMBER(3,0), 
    "AUTOS" NUMBER(3,0),  
    "AUTOIWN" NUMBER(10,0)
   ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 
 NOCOMPRESS LOGGING
  STORAGE(INITIAL 104857600 NEXT 104857600 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
  BUFFER_POOL DEFAULT)
  TABLESPACE "AUTODATA01" 

I was thinking about to select blocks of records (e.g. of 100.000), concatenate them internally and after it finishes to “export them”. However this seems to take long too . Based on my estimation it would take about 20 hours.

  OS : Solaris 
  DB : Oracle 11g  

Viewing all articles
Browse latest Browse all 717

Trending Articles