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.
When I create a web application and want to create a entity class from database Netbeans tries to read all the tables from the database. Exactly this tasks takes for ever. It took about 20mintues to load 130 tables. When I do the same with the database explorer it just pops up in a matter of milliseconds. I think it is not necessary to load the whole schema, since I only wanted to create one table anyway. I think it would be much more efficient to only load table names first and then load more information depending how many tables I selected.
The tables are read in order to allow adding related tables. When you have a table A with a foreign key on table B and in the wizard you add table A, table B is added as well. This would not be possible if only table names were read. That said, I've heard several similar complains, so I guess we should try to address this case -- probably by allowing the user to select if everything about the tables should be read, or just their names. The latter would disable the Add Related Tables checkbox.
How about if you'd only read the table names in a frist step. The user could then add those tables. Then I could check 'add related tables'. Now in the next step FK's from the selected tables are loaded and FK tables would be shown additionally to the other tables and i could remove the FK tables if i wanted to. This would greatly improve speed if I only wanted to add 2 or 3 tables (with or without FK tables). I guess this is the usual way to add entity classes in a 'grown' project anyway.
See also issue 130854.
Talked with David on this bug. He said the bottleneck is from generating the db schema file. In the future, we should switch to use metadata.
If this is purely a db issue, then we should reassign the bug to db module
It is not a purely db issue. The wizard could e.g. decide to read table names first, as suggested in desc3. Or it could allow to disable the "related tables" feature, as in desc2. Also, I doubt the metadata model would read the whole database schema significantly faster than dbschema.
*** Issue 138726 has been marked as a duplicate of this issue. ***
Also look at issue 76723
there are another possible reasons to read schema instead of names, if table have no primary key we can't generate entities and it currently clock creation on first step. also see issue 168637, it may be good to check if all columns have defined types.
It looks more like enhancement request, also there are a lot of reasons to load full schema, may be something can be improved.
What is the status on this? I posted a question today... http://netbeans.org/bugzilla/show_bug.cgi?id=227678 I'm stuck until I figure this out... thx
hang is completely another issue. but if you are not happy with performance to retrieve full schema also you can propose something under this issue also, if wizard should allow to filter result (i.e. get data for soem known tables or other options, may be discussed above)
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue. Thanks for your cooperation, NetBeans IDE 8.2 Release Boss
Yes it still exists in nightly-201609040002. Very slow retrieving of lots of tables. It seems that it may take half an hour to retrieve 3000 tables on an Oracle schema (jdbc7 driver). I don't think it is actually a bug (it's not broken) but an enhancement request. The past ideas are good candidates. Let it retrieve just the list of table names on schema to show and do actions on the next steps of the wizard for tables that are selected by the user.