Okay, so I came back to this connect time problem. It was not simple, but I finally cracked it. I will make an official enhancement request to allow for a script to be run on the Primary Connection before any of the catalog queries.
I wanted to avoid hex editing altogether but could not find a way. I tried to use the CANames.sql script which gets called before the catalog queries, but found that the CANames.sql script gets called on a different/temporary connection than the catalog queries:
00:00:06.632 TOracleSession $0AE18890 Start Session.LogOn as dkucera@xxxxxx
....
00:00:07.107 TOracleSession $0AE18CB0 Start Session.LogOn as dkucera@xxxxxx
....
00:00:07.260 TOracleQuery $0DDB5060 Start Query.Execute
SQL = /*
The name + type results of these queries will be used by the Code Assistant
if the "Describe Context" option is enabled. After typing 3 or more characters
the Code Assistant will show a list of matching names.
Separate multiple queries with semi-colons and use the :schema bind variable
to restrict names to the currently connected user.
In case of an error the query results will be omitted. No error message will
be displayed.
Place this file in the PL/SQL Developer installation directory for all users,
or in the "%APPDATA%\PLSQL Developer" directory for a specific user.
*/
SELECT * FROM (select DBPROC.PLSQL_DEVELOPER_FIX_SLOW_CONNECT

schema) as OBJECT_NAME, NULL as OBJECT_TYPE FROM DUAL) WHERE OBJECT_NAME='X'
:SCHEMA = DKUCERA
(just above is the CANames script executing)
....
00:00:07.374 TOracleQuery $0DDB5480 Start Query.Describe
SQL = select * from sys.dba_objects where rownum < 1
Notice how that Hex ID for the query on sys.dba_objects is different than the Hex ID for the CANames.sql script.
I found this useless query on the same Hex ID as the catalog queries that happens just prior:
00:00:07.328 TOracleQuery $0DDB5480 Start Query.Execute
SQL = select null from all_synonyms where 1=0
I found that in plsqldev.exe using "FlexHEX" and changed it to this:
00:00:07.328 TOracleQuery $0DDB5480 Start Query.Execute
SQL = select plsd "NULL" from dual
FlexHEX PLSQL Developer
plsd is a public synonym pointing to this procedure:
create or replace function dbproc.plsd_p
return VARCHAR2 is
begin
EXECUTE IMMEDIATE 'ALTER SESSION SET "_gby_hash_aggregation_enabled" = TRUE';
EXECUTE IMMEDIATE 'ALTER SESSION SET "_optimizer_enhanced_filter_push" = FALSE';
EXECUTE IMMEDIATE 'ALTER SESSION SET "_optimizer_push_pred_cost_based" = FALSE';
EXECUTE IMMEDIATE 'ALTER SESSION SET "_optimizer_unnest_scalar_sq" = FALSE';
EXECUTE IMMEDIATE 'ALTER SESSION SET optimizer_adaptive_features = FALSE';
EXECUTE IMMEDIATE 'ALTER SESSION SET optimizer_adaptive_reporting_only = TRUE';
EXECUTE IMMEDIATE 'ALTER SESSION SET "optimizer_mode"=RULE';
RETURN NULL;
end ;
I don't know which combination of those parameters does the trick, but it connects instantly now instead of taking 45+ seconds.
Maybe if some of you guys frustrated by the same problem can try this and confirm that it works for you as well to improve connect time, perhaps we can get some traction from Allround Automations to give us a way to do this without resorting to hex-editing their executable.