This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
JDBC Driver: Oracle thin Oracle version: 8.1.7 When displaying the database structure for a table with a lot of rows (e.g. 54 millions) the display takes ages. Displaying the structure of the same table when its empty is quite fast. Doing a count(*) on that table is pretty slow, so I suspect the DB module to do a count(*) (for whatever reason) before displaying the structure...
Database Explorer module is strongly based on JDBC database metadata and all information about the database structure is taken from this metadata. The module doesn't use any SQL statements to get the structure information. So if you expand the table node DatabaseMetaData.getColumns(...) method is called and the column nodes are created pursuant to the information provided by returned ResultSet. From this point of view I guess that it should be fast. Could you try to write a small standalone program to try to reproduce this problem outside the Database Explorer module, please? This program should call DatabaseMetaData.getColumns(...) method on your table and display the returned ResultSet information, e.g. in text form. If the response is also very slow, it's probably driver issue or the response from your db server is slow. I'm asking you for this because it works nice for me (but I have no table with so big number of rows as you) and nobody else has not reported similar problem yet. Thanks, Radko
I did some test and found that this is not Database Exporer bug but Oracle JDBC driver bug - more precisely bug of the DatabaseMetaData.getIndexInfo() method. When you expand a table node, DatabaseMetaData.getIndexInfo() method is called to find which columns are in the index and which are not. This information is important to set the appropriate column icon (red for primary key, green for unique key, blue for non-indexed columns). There is some bug in the DatabaseMetaData.getIndexInfo() method. The more rows in the table the more time this method takes (in my case for an empty table it takes 16ms and for table with 2 millions rows it takes 127s). That's why the display of the table structure is too slow for tables with a lot of rows. I did the same test with MS SQL Server and PointBase. In both cases the response was quite fast. I'm closing this bug as INVALID because it is an Oracle JDBC driver bug.
VERIFIED
Getting information about the database schema (creating table, column, etc. nodes) runs in a separate thread now so the IDE is not blocked anymore. Until the nodes are created, wait node is displayed.
Resolved for 3.3.x or earlier, no new info since then -> closing.