I'm working on a mature SS installation here. I'm trying to add a new page type but unfortunately I can't because MySQL returns the error message :
Line 536 in C:\xampp\htdocs\airosu\sapphire\core\model\MySQLDatabase.php "Too many tables; MySQL can only use 61 tables in a join" (preceded by the SQL select statement including every table in the database!).
Is this an upper limit for SS? Is there any way around this using MySQL? I've come across this before and trimmed one or two tables away but I need to add about 10. The join does not include obsolete tables so deleting them will make no difference.
I've come accross something similar when I tried to have about, well, over 61 has_one for a dataobject. This was not a great solution and I did a very nasty hack to get ti working - the "has_many" end of the relationship I'd add the hasone complex table field just after doing a set_stat('has_one', array( 'obj', 'obj')) to fool ss intot hinking there was a connection and it sorted out my issue (in a terribly hacky way).
well a bit of both then...
I've just had a look at the number of pages in my systems and I've got one nearing the 61 limit! :(
I've always been quite lazy with pages - creating new ones instead of using the allowed operations and rendering with a different type.
But I use a bunch of pages that are hidden - so I hope they are not going to be included in the sitetree rendering.
All of this is of course down to the ORM.
I'd advise you raise you issue in open.silverstripe.org to get progress from the ss team.
I know, this is a problem that has been skirted around for a while here. We've trimmed a page type or two when we've needed to add one but now we have a big project and I need about 10 new page types. It's a multi-country site as well which has blown things out a bit more than normal.
Thanks for your feedback. I'll further this with the SS team... We've a couple of options, a refactoring project to cut down on page types or maybe a switch to another database. Or lastly another CMS... should really be using some enterprise software here but the flexibility of SS is very attractive.