I want to get all table definitions for all my tables. And I want to do it fast (this is part of the script that I run a lot)
I am using oracle 11g and I have 700 tables. Simple jdbc code takes 4 minutes and does:
s = con.statement("select DBMS_METADATA.GET_DDL(object_type,object_name) from user_objects where object_type = 'TABLE');
s.execute();
rs = s.getResultSet();
while(rs.next()){
rs.getString(1);
}
SO I want to optimize this code and reach about 20 seconds.
I have already reached 40-50 seconds by creating 14 threads, each of which opens a connection to the database and reads part of the information using mod on rownum.
But this is not enough.
I think in these areas: