slow query on large multisite network

Hi,

I am running a large multisite network with thousands of users and subsite on it and I am using the support system plugin to communicate with my subsite admins.

When I want to display the history view of the single ticket manage page, the page takes almost 30 seconds (!!) to appears (this display time has continuously grown since the beginning of the network with the increasing number of sites and users on it).

If I look into the plugin code, it seems you are using the get_ticket_details( $tid ) function (in /incsub-support/model/model.php line 680) to prepare items for the page.

But this function is *very* heavy with 7 left joins returning a lot of information that are not used by the final rendered table .

Don't you think it would be possible to lighten the query a bit, in order to just return the useful information in an acceptable time ?

I was looking into this and I can see your point. It is indeed a heavy query if you have too many users.

You said that not all the data is used but, as far as I can see, all the joins are necessary for the data that is being rendered. -there might be some unused field though-.

Unfortunately, I can't see an easy way to change this. It would require some modifications in the code, either to improve the current query or to reduce the amount of data required.

In any case, I would like to ask you if you tried to run the sql query directly against your DB. Does it takes the same time? Just want to be sure that the problem is only the sql query. Please confirm.

I'm flagging the lead developer to get his input also.

Let me know if you need to get this working urgently, and I'll assist you in the code modifications. Of course, you will need to specify what information is useful for you and which part we can get rid off.

How do you rate me?

Thank you for rating your experience!

We’re thrilled to hear you had a great experience with . Would you like to leave a comment about your experience?
Thanks for voting on your experience with , we’d love to get some feedback please.
Ohh no! We’re really sorry to hear you didn’t have a pleasant experience with , we’re always looking at how we can improve and would appreciate you provide some further feedback here please.
Type your feedback here

it's great that you had a positive one. Based on your experience in this ticket would you please be kind enough to rate us externally on: