help to better help you:

Please: add always Joomla / JEM version and details to your posts, so we can try to reproduce your issue!

Venue listview in admin is real slow

Venue listview in admin is real slow

7 years 10 months ago - 7 years 7 months ago
#23274
I have a site with 575 venues and over 15.000 events (including archived events) When opening the venue list in the admin, it takes a lot of time to run the query on the database, since the list is counting all the events assigned to the venues in the list. This is fine on a small site, but on a large site like mine hardly useable, since the list & query is rebuilt every time you have this list view (i.e. after an edit/save).
Is there a way to disable the counting of the events? There's no real need for a count in the list view. It's only necessary when you try to delete a venue that has events associated with it. At that point one single count query should take place.
Last edit: 7 years 7 months ago by stevent.

Please Log in or Create an account to join the conversation.

Re: Venue listview in admin is real slow

7 years 7 months ago - 7 years 7 months ago
#23591
I've been inspecting the query. It retrieves more fields from the database than is displayed in the list view. At least one join could be skipped, since there is no modified-by information. To speed things up and reduce the execution time by 50% remove all the unnecessary fields and the the query could be:
Code:
SELECT a.id, a.venue, a.alias, a.url, a.street, a.city, a.state, a.country, a.created_by, a.published, a.checked_out, a.checked_out_time, a.ordering, uc.name AS editor, u.email, u.name AS author,COUNT(e.locid) AS assignedevents FROM `#__jem_venues` AS a LEFT JOIN #__users AS uc ON uc.id = a.checked_out LEFT JOIN #__users AS u ON u.id = a.created_by LEFT OUTER JOIN #__jem_events AS e ON e.locid = a.id WHERE a.published IN (0, 1) GROUP BY a.id ORDER BY a.venue asc LIMIT 25

It can be even more efficient if the list view had even less columns. Do we need the state or the creator email in the list view?
But it's mainly the count of the events that is the problem here.
Last edit: 7 years 7 months ago by stevent.
The following user(s) said Thank You: jojo12

Please Log in or Create an account to join the conversation.

Time to create page: 0.387 seconds