Bug #42600 "Autolayout" option gives poor layout for large schemas
Submitted: 4 Feb 2009 19:21 Modified: 19 Oct 2009 13:09
Reporter: Nathan Christiansen Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Workbench Severity:S3 (Non-critical)
Version:5.0.29 OS:Windows
Assigned to: CPU Architecture:Any
Tags: autolayout large schemas, TTREV

[4 Feb 2009 19:21] Nathan Christiansen
Description:
We have a MySQL schema with 353 tables and 2480 fields.

I was trying to import the schema into MySQL Workbench OSS (through the Reverse Engineer MySQL Create Script option). I chose the option to "Autoplace objects in new diagram" option.

The resulting layout included at least 90 of the table graphics in the top left corner layered on top of each other. The other tables tended to overlap (not quite as badly at the bottom right.

I then tried to enlarge the diagram size to a point where there should have been plenty of room to lay out the tables without overlapping (20 pages by 15 pages). 

Then selected Autolayout from the Arrange Menu. The resulting layout still had the 90+ tables overlapping in the top left corner and did not fully correct the other tables overlapping.

It should also be noted that I changed the font sizes to larger fonts so we could more easily read the printout. If requested I can also supply the .mwb file with the settings how I have them.

How to repeat:
I will attach to this issue an anonymized MySQL create script. 

(This is an actual real world production database schema. The only change was in the names of the tables, fields, enum values, key names, and constraint names. So you can use it as a test case for performance and other issues.)

Suggested fix:
Use the supplied file as a test case to improve the automatic layout engine.
[4 Feb 2009 19:25] Nathan Christiansen
The schema has been added to the ticket set to "developers only" visibility.
[4 Feb 2009 19:27] Nathan Christiansen
Added workbench file with font preferences set to "developers only" visibility.
[4 Feb 2009 19:52] Valeriy Kravchuk
Thank you for the problem report.
[9 Feb 2009 11:43] Rob Janssen
I have the same problem with just under 20 tables; even setting the diagram size to 15x15 pages or larger doesn't stop the MySQL Workbench from messing up the diagram. Some tables end up at the top left and others are just overlapping each-other or just laid out in plain stupid ways. This feature would save us so much time when functioning correctly though now we have to lay out the tables for every project by hand again and again. There are worse jobs but nonetheless I would like to see this fixed :-)
[9 Feb 2009 11:45] Rob Janssen
Oh, forgot to mention that the problem has been around since 5.0.<something>; at LEAST since 5.0.26 but way before too if I remember correctly.
[19 Oct 2009 11:36] Susanne Ebrecht
This is still true for Workbench 5.2.

Doesn't matter how much tables ... they all just get placed in the left top corner.
[19 Oct 2009 13:09] Susanne Ebrecht
This is a duplicate of bug #43455
[9 Mar 2010 17:51] Jose Alejandro Carrillo Neira
This is no duplicate of bug #43455, because the order is messed up on loading, but this one is due to using the "Autolayout" feature. 

This is also true on GNU/Linux Debian "squeeze" 6.0, using MySQL Workbench 5.12.16
[10 May 2011 19:53] Stephen Dewey
This is still a problem. Maybe there's some graph theory that can help us fix it?
[10 May 2011 20:02] Alfredo Kojima
Stephen, can you upload a sample bad layout screenshot? The layouter has been improved recently, although it still doesn't do miracles.
[26 Aug 2012 1:56] Brad Chesney
My warmachine is a commodity Core2 Duo x86_64 laptop running Kubuntu 12.04 that has MySQL Workbench 5.2.38 installed.

As of today 2012-08-25 (ISO 8601 yyyy-mm-dd) I am able to pull database information from a Debian Squeeze LAMP server to create a new EEG diagram.

I can manually arrange my 51 tables and 3 views into five pages-- of a 3 page X 2 page grid. Autoarrange did not overlap my tables at all. It's a bird's nest because of all my foreign key constraints, but no overlap. Good work people.

(I cannot even imagine the logic that would replicate the manually arranged, aesthetically pleasing EER diagram I end up with. But, I came here via Google because I was looking for a solution to have less "bird's nest" as a result of auto-arrange.)