06-20-2014 02:30 AM
I am fetching huge data from oracle based on ASOFDATE conditionbut it is taking more then 50 minutes
connect to oracle(user=XXXXXXX password="XXXXXXXX" path='XXXXXXXXXXXX');
CREATE TABLE ABC AS SELECT * FROM CONNECTION TO ORACLE
(SELECT * XYZ where ASOFDATE='15-AUG-2014');
DISCONNECT FROM ORACLE;
is there any way to minimise time taking
06-20-2014 03:37 AM
You can use ORACLE LIBNAME Engine to reduce the time.
Hope following will work for you - please set options correctly. ( path, schema, user , orapw )
LIBNAME oradbms ORACLE PATH= SCHEMA= USER= ORAPW= ACCESS = READONLY DBINDEX = YES ;
06-20-2014 04:23 AM
I wouldn't expect there to be any difference in the operation of the libname syntax against the connect in the proc sql as the actual connection would be a tiny amount of time.
I would suggest that you have a look at the data on the database and see if there are ways to cut down the amount of data to be output, firstly, do you really want all the variables to come out, if not remove the *. How many records are you talking about with the where ASOFDATE='15-AUG-2014', restriction? Maybe try parting it out into smaller subgroups. It could also be other things, network speed, where files are being written to, amount of ram/processor etc.
Have you tried running the query in Toad or similar to see the operation there? Also consider writing the data directly out to CSV from the database, then import to SAS, maybe quicker.