# Code Assists not working

**URL:** <https://forums.toadworld.com/t/code-assists-not-working/54552>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [January 31, 2022, 1:35pm UTC](https://forums.toadworld.com/t/code-assists-not-working/54552 "2022-01-31T13:35:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jagomez](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jagomez](https://forums.toadworld.com/u/Jagomez)\
**Post date:** [January 31, 2022, 1:35pm UTC](https://forums.toadworld.com/t/code-assists-not-working/54552/1 "2022-01-31T13:35:19Z")

</div>

Hello.

I am on Toad 15.1 (Latest version) and code assists does not work pretty well. If I select Join Suggestion, it takes forever saying "Loading constrains..." But nothing happen. If I uncheck this option, only tables, views and users are recover, but missing all objects such as procedures or functions.

Regards,

---

<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:** [January 31, 2022, 1:40pm UTC](https://forums.toadworld.com/t/code-assists-not-working/54552/2 "2022-01-31T13:40:12Z")

</div>

I understand that it's taking a long time, but how long did you wait?  
It should only have to load constraints one time, so if you let it finish, then the next time the code asssist window appears, it won't run any queries at all and will be very fast.

Procedures, packages, etc, are not controlled by the "Join Suggestions" option. They have their own checkboxes in the same place in options. Please double-check that.

---

<div class="post-metadata">

**Author:** ![Jagomez](https://avatars.discourse-cdn.com/v4/letter/j/94ad74/32.png) [@Jagomez](https://forums.toadworld.com/u/Jagomez)\
**Post date:** [January 31, 2022, 1:48pm UTC](https://forums.toadworld.com/t/code-assists-not-working/54552/3 "2022-01-31T13:48:47Z")

</div>

Hi John.

Exactly, procedures and functions were unchecked. After Check, problem was solved. And know (after loading Constrains for 3 minutes), it is much faster,

Regards

---

<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:** [January 31, 2022, 1:57pm UTC](https://forums.toadworld.com/t/code-assists-not-working/54552/4 "2022-01-31T13:57:11Z")

</div>

Wow, 3 minutes is very slow. I'm sorry about that. In all of our tests, the new query was faster than the old one.

Can you let me know what database version you are using, and about how many tables and foreign key constraints there are?

Also, make sure that your statistics on the data dictionary are up to date. You can do that with the script below (it may take a few minutes to run)

```auto
BEGIN
  SYS.DBMS_STATS.GATHER_DICTIONARY_STATS (
     Granularity => 'AUTO'
    ,Options => 'GATHER STALE'
    ,Estimate_Percent => SYS.DBMS_STATS.AUTO_SAMPLE_SIZE
    ,Degree => SYS.DBMS_STATS.DEFAULT_DEGREE
    ,Cascade => DBMS_STATS.AUTO_CASCADE
    ,No_Invalidate => DBMS_STATS.AUTO_INVALIDATE);
END;
/

BEGIN
  SYS.DBMS_STATS.GATHER_FIXED_OBJECTS_STATS (
     No_Invalidate => DBMS_STATS.AUTO_INVALIDATE);
END;
/

```
