Toad World® Forums

Code Completion - Undesired/Dangerous Behavior

Version: 3.2x stable and current 3.3 beta
Database: Teradata (.Net connection)

We found an issue with one of our analysts using code completion. When code completion drills down to the column level, clicking on a column or the expand box next to it causes a TOP query to run to get sample data for the column (expected behavior).

In our environment, our analysts use a “semantic layer” consisting of only views. Some views are simply “select * from table” used to prevent locking tables but others are much more complex. When code completion runs TOP on one of these more complex views, it causes slowdowns and, sometimes, unresponsiveness in the database due to high-skew and processing intensiveness. Currently, the only way to kill the query is to shutdown TDP since the TOP query is not presented to the user as background process that can be canceled manually (conversely, viewing the Data tab when viewing an object’s details does allow the user to kill the TOP query from Background Processes). Sometimes shutting down Toad doesn’t kill the query and we have to get the DBA to kill it for us.

Could an option be added to the Code Completion options to turn off this behavior? For our analysts, drilling down the column is enough and it would be better for the DB, too. Thanks.

there is an option in Code Completion section - ‘Exclude column sample data’ (unchecked by default). I guess it is what you are looking for

Doh! I can’t believe I missed it. I’ll test it now. Thanks for your help.

Could there be a change request added to present the sample query as a background process the user can kill?

Message was edited by: itlnstln

I just tested Code Completion with this option checked and it still submits the TOP query.

Here’s a screen shot.