Skip Navigation

[Closed] 60 secondes for show page after update database types 3.4

This support ticket is created 3 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+00:00)

This topic contains 8 replies, has 2 voices.

Last updated by Jamal 3 years, 5 months ago.

Assisted by: Jamal.

Author
Posts
#1814169

Hello,
I had the misfortune to click on
"" Toolset needs to update the database. This will take a few minutes to complete. "

Since your last toolset update and database restructuring my site has become unusable.

The pages containing the views are displayed in 60 seconds !!!!!!!!!! and it was causing downs of the server and timout.

I noticed that you had created an intermediary database relationship ...

You say here: https://toolset.com/2020/07/what's-new-in-types-3-4/
that it is to optimize with wpml but I do not use it. I need simple relationships not to add unnecessary extra relationships.

I can give you private access to the admin of the site hidden link so that you notice the concern of the pages that cause concern because I was obliged to put the site under maintenance.

Exemple query sql complexity in after update :

After update : The query is in timout
select count(*)
from wphf_posts cities
left join wphf_toolset_connected_elements wtce on wtce.element_id = cities.id
left join wphf_toolset_associations wta on wta.parent_id = wtce.id
left join wphf_toolset_connected_elements wtce2 on wtce2.id = wta.child_id
left join (select * from wphf_posts where post_type = "entreprise") ent on ent.ID = wtce2.element_id
where cities.post_type = "ville"
and ent.ID is null

This query is ok with old relationship.

select count(*)
from wphf_posts cities
left join wphf_toolset_associations_old wta on wta.parent_id = cities.id
left join (select * from wphf_posts where post_type = "entreprise") ent on ent.ID = wta.child_id
where cities.post_type = "ville"
and ent.ID is null

TY

#1814673

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Hello and thank you for contacting the Toolset support.

I set your next message as private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please let us know where did you find these SQL queries? in the Toolset debug popup or another plugin?
What pages present this slowness?

#1822263

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Complex SQL queries should not cause a problem, because database engines can optimize the queries.

I logged into your website and tried to understand how the page is built. The page uses a content template, that includes a view(Entreprises) of nested views(Avis).

The content template is using a view that has an erroneous query filter. The query filter should choose the correct relationship and should be set to the page where this view is shown instead of the current post in the loop. Check this screenshot hidden link

But, this did not help much, because the issue was coming from the shortcode call_related_LesAvis, once I removed it, the page was loaded in 8s instead of 90s in my tests.

[call_related_LesAvis]

I removed the shortcode and instead of it the view that it uses:

[wpv-view name="view-to-show-les-avis-related-to-entreprises" wpvrelatedto="[wpv-post-id]"]

But, that did not help either. So, I duplicated the view and updated its query filter to be set to the related posts of the current post in the loop.

[wpv-view name="view-to-show-les-avis-related-to-entreprises-in-loop"]

This resulted in 70s instead of 90s.

So, I'll suggest the following:
- Either remove the nested views(Avis) and put them inside of each "Entreprise" single post page content template.
- Implement pagination, so the page will have fewer Entreprises and therefore fewer nested views.
- Increase the CPU/Memory capacity of your website to handle the necessary workload.

I wonder if you have a previous backup of the website(before the update) so we can analyze and compare the performance between both versions.

#1823287

Hello,

I need the site as it was. I need the reviews and companies on the same page.
It was working well before your maj.

I can give you access to hidden link which works very well.

Did you understand the changes to the database with this new update as I explained to you? Does this add intermediate relationships?

So how do I ignore this database structure on the other sites I have on this model?

#1823291

Once again the site worked well before and I identified with 1 specialized wordpress developer the change of the database. It is the change in the relations of the database that causes these delays.

The new toolset update is not optimized for performance at all. You created it for wpml support and translation management but I don't use it.

Is it possible to downgrade the version to restore the old database structure?

#1823301
maj.PNG

I clarify once again: If I click on the button in pj. This changes the database and causes concern. How to refuse this new update of the database?

I just did it again on other sites and same problem. I had to restore the previous version. If I update the data base all the city pages take 60 seconds to show !!!!!!

Just for display 20 companies maximum in city and 10 maximum reviews per company ... amazing perforance...

#1825861

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

We can't update Toolset Types to the latest releases >3.4 without completing the database migration as it will create inconsistencies between the PHP code and what it expects in the database.
I understand that you are not using WPML, but we can't produce two versions of the plugin(For WPML and without WPML).

Please note, that our websites(toolset and WPML) have huge databases with too many relationships and do not present any performance issues from the update. Maybe, you have something else on your website that is causing performance issues with the new update.

What I would suggest is to provide us with a copy of your site(or second site) before the update. So we can check these pages before and after the update. That would help us debug and investigate what is causing performance problems.

#1829851

Bonjour,

Oui, avez vous un ftp à me donner pour que je puisse vous uploader la bd + ftp ?

Merci

#1829953

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+00:00)

Unfortunately, I do not have right now any storage space, but I can check with our systems team if needed.

Would it be possible for you to share it through Google Drive or DropBox? Or, you can share credentials to your website and let me try to build a Duplicator copy and download it directly.

Your next reply will be private to let you share credentials or download links safely.

The topic ‘[Closed] 60 secondes for show page after update database types 3.4’ is closed to new replies.