DB2 code completion

I'm using DBE version 138-2221.3 with DB2 Express-C 10.1 fixpack 2.

When I connect to database code completion does not work. I have to do synchronized and then code complation works.
OK, the problem is that I have over 8000 tables and 5000 procedures and synchronization is done in over 16000 seconds. That is almost 4 hours and a half.

If I have to do this every time we change something in a table, procedure, ... this tool is then unusable to me.

6 comments
Comment actions Permalink

Thank you for reporting. It may be indeed a problem of IDE, or JDBC driver, or network connection. Please, attach a CPU snapshot taken from the start to the end of synchronization process, like described here:
https://intellij-support.jetbrains.com/entries/29983118-Reporting-performance-problems

If possible, capture a process that takes less than 16000 seconds: in this case the snapshot can be enormous. E.g. try to synchronize only one schema with less number of tables, if you have one.

Thanks,
Alexander.

0
Comment actions Permalink

I'm sorry, but I cannot.

After setting "-agentlib:yjpagent-linux64=delay=10000"
and restarting DBE I don't have Tools menu where I could select "Start CPU Usage Profiling".

0
Comment actions Permalink

Yes, Tools menu is removed from 0xDBE - sorry for confusion. But the actions are available.

Please show the main toolbar, if not yet (main menu / View / Toolbar). The profiling button group is the rightmost one.

Alexander.

0
Comment actions Permalink

Here is the CPU snapshot. I have only selected couple of shemas.



Attachment(s):
DB-138.2221_gregor_19.09.2014_23.03.17.zip
0
Comment actions Permalink

Thank you for the snapshot. JDBC MetaData API is currently used to retrieve DB schema.
It seems that some of the following consumes most of the time:

  • jdbc.MetaData.getPrimaryKeys()
  • jdbc.MetaData.getImportedKeys()
  • jdbc.MetaData.getIndexInfo()
  • jdbc.MetaData.getVersionColumns()


Those calls are performed on a per-table basis because majority of JDBC drivers do not support per-schema retrieving.

To find out what exactly happens you can turn on DB2 driver logging as described here:

http://www.ibm.com/developerworks/data/library/techarticle/dm-0506fechner/

Logs should help to push the investigation further.

I'm attaching sample screenshot.

Screen Shot 2014-09-22 at 19.12.36 .png

0
Comment actions Permalink

In my experience using JDBC Metadata with JDBC driver is very slow.
I'm our application we are doing plain SELECTs agains SYSCAT schema.
I'm attaching new CPU trace and JDBC trace.



Attachment(s):
trace.zip
0

Please sign in to leave a comment.