I discovered that code towards the bottom executes a lot more than ten minutes on my small server. The server is quite good and that i cannot find any appropriate explanation for your. I'm using Joomla 1.6.3 the information is migrated from Joomla 1.5.23 using jUpgrade and MySQL client version is 5.1.45.

SELECT a.*,COUNT(DISTINCT m1.id) AS count_published,COUNT(DISTINCT m2.id) AS count_unpublished,COUNT(DISTINCT m3.id) AS count_trashed
FROM `j16_menu_types` AS a
LEFT JOIN `j16_menu` AS m1 ON m1.menutype = a.menutype AND m1.published = 1
LEFT JOIN `j16_menu` AS m2 ON m2.menutype = a.menutype AND m2.published = 0
LEFT JOIN `j16_menu` AS m3 ON m3.menutype = a.menutype AND m3.published = -2
ORDER BY a.id asc;

I'd be happy if a person may help me since i have am in large trouble :)

P.s. I've downloaded db and checked it on my small computer - still exactly the same, execution time is terrible. Can there be in whatever way to resolve this issue? Or possibly to get rid of this sql part without significant alterations in administration of joomla? Well it had been done quite faster on my small PC but nonetheless it makes sense not even close to the one that would satisfy my. enter image description here

EDIT Well, I have found a reported bug of the problem. http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=24868

And also the option would be:

CREATE INDEX idx_menu_published ON j16_menu (published);

However, I don't know how this can affect administration. I there's anybody who could briefly tell how this part works and really should I edit Joomla core code or simply make use of the above code on mysql once. I'm wondering basically should index table each time after i edit menu.

A database / table Index is simply a type of phone book if you do not mind the comparison. It updates instantly. If the Index fixes your condition there's little else you must do or do again. You cannot break anything either - so just try it out.