Bug #56014 Table-Editor stalls on populating "referenced table" dropdown-list
Submitted: 16 Aug 2010 13:41 Modified: 6 Jan 2011 12:27
Reporter: Johannes Taxacher Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S3 (Non-critical)
Version:5.2.26 OS:Any
Assigned to: Sergei Tkachenko CPU Architecture:Any

[16 Aug 2010 13:41] Johannes Taxacher
Description:
The problem occurs when having larger number of tables stored in the DB instance. The dropdown that opens as editor for "referenced table" is populated with all tables from all acessible schemas - this can result in a non-responding app for several seconds or even minutes (if table count in DBserver is >10k) when loading the content for that dropdown the first time.

How to repeat:
- connect a query session to a server that contains a large number of tables
- open a table editor (either alter a existing table or create a new one)
- goto FK tab, enter a new FK name and press tab key ...
(takes a considerable amount of time for the dropdown to be opened)

Suggested fix:
one possible solution would be to limit the content of the dropdown-field to tables from current schema. but we still need to offer the possibility to select referenced tables from different schemas as well. also for single schemas containing large numbers of tables, this doesn't fix the problem.
[17 Aug 2010 6:21] Roel Van de Paar
Some ideas:

#1 Retrieving could be done based on the schema: select schema first, then db

- schema 1 (clicked/opened, either with a "+" mark before it or similar idea like ">" etc.)
  |- table 1
  |- table 2
+ schema 2
+ schema 3

#2 Can some sort of intelligent (or pre-) caching be employed here?
#3 Where does this info come from? Are other methods possible (I_S ?)
#4 Besides the above, it may be necessary to speak with the mysqld devs to see if they have any other idea, or, worse case scenario, maintain some list for this in newer versions (5.5....)
[8 Dec 2010 21:13] Johannes Taxacher
fixed in release 5.2.30
[6 Jan 2011 12:27] Tony Bedford
An entry has been added to the 5.2.30 changelog:

In the Table Editor of the SQL Editor, on the Foreign Keys tab, selecting the Referenced Table dropdown for a database containing a large number of tables resulted in MySQL Workbench becoming unresponsive while the dropdown was being populated.