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.

Bug 18229 - Display of table structure very slow with large tables
Summary: Display of table structure very slow with large tables
Status: CLOSED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: PC Windows 3.1/NT
: P3 blocker (vote)
Assignee: Radko Najman
URL:
Keywords:
Depends on: 28199
Blocks:
  Show dependency tree
 
Reported: 2001-11-30 15:05 UTC by tkellerer
Modified: 2003-06-30 17:17 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tkellerer 2001-11-30 15:05:37 UTC
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...
Comment 1 Radko Najman 2001-12-04 11:13:30 UTC
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
Comment 2 Radko Najman 2002-01-07 18:09:08 UTC
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.
Comment 3 Martin Schovanek 2003-03-12 15:46:44 UTC
VERIFIED
Comment 4 Radko Najman 2003-04-22 14:07:59 UTC
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.
Comment 5 Quality Engineering 2003-06-30 17:17:43 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.