Toad World® Forums

Table Script too long to open.

When I ask to display the script of a table, it takes 30 seconds, an idea.

Most likely, Oracle is taking a while to execute one of the queries that we are sending it to generate the script. If you turn on Spool SQL (Database -> Spool SQL -> Spool SQL to screen), you’ll see all of the queries that Toad sends to Oracle, with timestamps on each one, so you can see how long they are taking to run. Unfortunately, as Oracle adds more and more features, we have to run more and more queries to be sure that we have a complete script for your table. Also, I will say, that the first script generation that you do after making a connection in Toad - that one will probably take the longest. There is one query that we run against DBA_TYPES that is sometimes a little bit slow. We cache the results of this query for the duration of the connection, so it only has to be run once.

Anything object type you check in the script options dialog results in queries being run. So if you can live without something in the output, uncheck it.

Thanks, i will check this .

Hi,

I suggest to have Toad as nice quick view, but for any prod action I would recommend to use Oracle core libraries,like…

execute DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,‘CONSTRAINTS_AS_ALTER’,true);
select dbms_metadata.get_ddl(‘TABLE’,‘TABLE_NAME’,‘USER_NAME’) from dual;
select dbms_metadata.get_ddl(‘INDEX’,‘INDEX_NAME’,‘USER_NAME’) from dual;