This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

Tagged: 

This topic contains 5 replies, has 3 voices.

Last updated by Ricardo Alday 1 year, 4 months ago.

Assigned support staff: Ricardo Alday.

Author Posts
April 23, 2018 at 5:01 pm #1774006

ipsow

Tell us what you are trying to do?
Doing a gtmetrix I see a long server response time.
So I have installed the query monitor plugin.
It reveal a slow query with wpml :

Query Caller Component Rows Time
SELECT DISTINCT s.id, s.name, s.context, st.status, s.gettext_context, st.value AS tra, st.mo_string AS mo_string, s.value AS orig
FROM wp_icl_string_pages sp
INNER JOIN wp_icl_string_urls su
ON su.id = sp.url_id
INNER JOIN wp_icl_strings s
ON s.id = sp.string_id
LEFT JOIN wp_icl_string_translations st
ON s.id=st.string_id
AND st.language=su.language
AND s.language!=su.language
WHERE (su.language='fr' and su.url='/') or (su.language='fr' and su.url IS NULL)
-
do_action('plugins_loaded')
inc/plugin.php:453
A3_Lazy_Load_Admin_Init->add_admin_menu()
mods/a0db5564/admin/admin-init.php:108
apply_filters('a3_lazy_load_add_admin_menu')
inc/plugin.php:203
A3_Lazy_Load_Settings_Page->add_admin_menu()
mods/a0db5564/admin/admin-pages/admin-settings-page.php:85
A3_Lazy_Load_Settings_Page->page_data()
mods/a0db5564/admin/admin-pages/admin-settings-page.php:62
__()
inc/l10n.php:202
translate()
inc/l10n.php:134
apply_filters('gettext')
inc/plugin.php:203
icl_sw_filters_gettext()
mods/de1ef01c/inc/functions.php:659
icl_translate()
mods/de1ef01c/inc/functions.php:265
WPML_Register_String_Filter->translate_by_name_and_context()
mods/de1ef01c/classes/filters/class-wpml-register-string-filter.php:55
WPML_Displayed_String_Filter->get_translation()
mods/de1ef01c/classes/filters/class-wpml-displayed-string-filter.php:114
WPML_ST_DB_Cache->get_translation()
mods/de1ef01c/classes/filters/db-cache/class-wpml-st-db-cache.php:98
WPML_ST_Page_Translations_Cached_Persist->get_translations_for_page()
mods/de1ef01c/classes/filters/db-cache/persist/class-wpml-st-page-translations-cached-persist.php:38
WPML_ST_Page_Translations_Persist->get_translations_for_page()
mods/de1ef01c/classes/filters/db-cache/persist/class-wpml-st-page-translations-persist.php:47
Plugin: wpml-string-translation

I have followed the thread about how to perform wpml.
I did it, but it still a slow query.
How to fix this ?

I can give you the url of the website on private.
I'm on a dedicated server.

April 25, 2018 at 6:03 am #1802020

Itamar
Supporter

Languages: English (English ) Hebrew (עברית )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi.

Thank you for contacting the WPML support forum.

If you add the debug information, then I'll also have the URL of your site and more information about your server and WordPress configurations. The debug info will give me a lot of information about how your site is configured and will help me understand the source of the problem.

Could you please share your Debug information with me?
You can read a detailed explanation about it here.
http://wpml.org/faq/provide-debug-information-faster-support

Is everything updated on your site to its latest version (WordPress WPML and its add-ons)?
Also, please specify on which pages you see the slow queries issue.
Are those front-end or back-end pages?

Please, could you provide me the additional info?

Thanks,
Itamar.

April 25, 2018 at 8:53 pm #1819800

ipsow

Yes, i have the latest version.
I'm just checking the frontpage.

I have a lot of plugin, I have disabled the auto register of string translation much after installing everything.
Maybe I have a lot of string who i don't need to be translated saved in the database ?

April 26, 2018 at 5:45 pm #1841929

Ricardo Alday

Hi,

Can you please try the following:
1. Backup your site and DB
2. Access to your DB and run this SQL query:

DELETE FROM `wp_icl_strings` WHERE status = 0;

Let me know if it helps.
Ricardo

April 26, 2018 at 6:02 pm #1842137

ipsow

I already did it.
I have 26 778 rows in the string translation.
Is it too much and that why it make slow query ?

April 26, 2018 at 11:22 pm #1846523

Ricardo Alday

In WPML -> String Translation, you can select the strings using the checkbox and delete them from the String Translation table if you don't need them
Backup first, just in case.

The topic ‘[Closed] Performance problem with slow query’ is closed to new replies.