# Table Script too long to open.

**URL:** <https://forums.toadworld.com/t/table-script-too-long-to-open/39013>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [January 31, 2017, 5:54am UTC](https://forums.toadworld.com/t/table-script-too-long-to-open/39013 "2017-01-31T05:54:00Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![clement.dostie](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@clement.dostie](https://forums.toadworld.com/u/clement.dostie)\
**Post date:** [January 31, 2017, 5:54am UTC](https://forums.toadworld.com/t/table-script-too-long-to-open/39013/1 "2017-01-31T05:54:00Z")

</div>

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

 ![Capture.jpeg](https://global.discourse-cdn.com/quest/original/2X/4/4f85a9cb9781d50f5ceb1437c26bde0c65f3b6e5.jpeg)

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [February 1, 2017, 6:34pm UTC](https://forums.toadworld.com/t/table-script-too-long-to-open/39013/2 "2017-02-01T18:34:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![clement.dostie](https://avatars.discourse-cdn.com/v4/letter/c/ea666f/32.png) [@clement.dostie](https://forums.toadworld.com/u/clement.dostie)\
**Post date:** [February 14, 2017, 8:37am UTC](https://forums.toadworld.com/t/table-script-too-long-to-open/39013/3 "2017-02-14T08:37:29Z")

</div>

Thanks, i will check this .

---

<div class="post-metadata">

**Author:** ![damir.vadas\_250](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/damir.vadas_250/32/37_2.png) [@damir.vadas\_250](https://forums.toadworld.com/u/damir.vadas_250)\
**Post date:** [February 15, 2017, 2:55am UTC](https://forums.toadworld.com/t/table-script-too-long-to-open/39013/4 "2017-02-15T02:55:03Z")

</div>

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;
