Please make sure to update to WPML 4.3.5 and check our list of Known Issues before reporting

Hi, Amit here, I am the WPML Support Manager, our current ticket queue is high, update your WPML plugins and make sure you meet the minimal requirements for running WPML before reporting an issue please - many tickets are resolved doing that

Please look at our updated list of Known Issues and you can also use our support search to find helpful information and of course review our documentation before opening a ticket.

If you do need to open a ticket please make sure to provide us with all the needed information as described in this page

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 2 voices.

Last updated by Bruno Kos 8 months, 2 weeks ago.

Assigned support staff: Bruno Kos.

Author Posts
March 21, 2019 at 3:22 pm #3409679

sergeyS-14

My hosting provider send me this:

Date: 2019-03-21 07:21:13 Query_time: 4.327664 Rows_examined: 419802: Rows_sent 12 Lock_time: 0.000243

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts JOIN wp_icl_translations wpml_translations ON wp_posts.ID = wpml_translations.element_id AND wpml_translations.element_type

Date: 2019-03-21 07:15:45 Query_time: 4.386866 Rows_examined: 772881: Rows_sent 50 Lock_time: 0.000299

SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts LEFT JOIN wp_postmeta ON (wp_posts.ID = wp_postmeta.post_id AND wp_postmeta.meta_key = 'layf_exclude_from_feed' ) LEFT JOIN wp_postmeta AS mt1 ON ( wp_posts.ID = mt1.post_id ) LEFT JOIN wp_icl_translations wpml_translations ON wp_posts.ID = wpml_translations.element_id AND wpml_translations.element_type = CONCAT('post_', wp_posts.post_type) WHERE 1=1 AND ( wp_postmeta.post_id IS NULL OR ( mt1.meta_key = 'layf_exclude_from_feed' AND mt1.meta_value != '1' ) ) AND wp_posts.post_type IN ('property', 'post') AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'expired') AND ( ( ( wpml_translations.language_code = 'ru' OR 0 ) AND wp_posts.post_type IN ('post','page','attachment','property','service' ) ) OR wp_posts.post_type NOT IN ('post','page','attachment','property','service' ) ) GROUP BY wp_posts.ID ORDER BY wp_posts.post_date DESC LIMIT 0, 50;

1. Query_time: 4.327664
2. Query_time: 4.386866

Is it possible to improve the performance of those query or this is normal?

March 22, 2019 at 9:13 am #3438805

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Thank you for contacting WPML support!

Can you tell me how much content do you have on the site (approximately)? Talking about pages and their translations, string translations, etc.

Also, can you tell me if you are experiencing slow performance on either frontend of the site or the backend?

I believe that these can also give you some useful info:
https://wpml.org/2012/01/can-your-site-run-faster/
hidden link

Also find some useful info on this topic:
https://wpml.org/forums/topic/how-to-optimize-wpml-performance/

But see this - this is what one of our clients did and based on their benchmarks, the site was very fast after this - they even did some direct changes on databases, loaded some strings from mo files instead of database, etc.

https://wpml.org/forums/topic/slow-wpml-performance/#post-3229765

Regards,
Bruno Kos

March 22, 2019 at 10:21 am #3439331

sergeyS-14

There is a lot of data i believe.

around:
50 pages
500 posts
1100 property type (here is a lot of property taxonomy and metas we use for each property)
10 service type
30000 images

Fore each language and it will be more...

I cant tell if this is occur in frontend or in backend, my hosting provider send me this because some times we got 503 error when some one edited property so i ask them what is going on.

We have cloud vps with 4 cpu and 8gb of memory,
w3-total-cache (not pro) enabled with opcode, memcache for Database and Objects enabled.

Shold we improve some query or database structuire etc?

I dont blame wpml plugin only but may be its related.

Do you have Another suggestions?

March 22, 2019 at 1:50 pm #3440823

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Since you said this:

send me this because some times we got 503 error when some one edited property so i ask them what is going on.

I'd like to find out what happens in that exact moment, as this might give us some ideas on what's behind the scenes. Therefore, can you do the following?

Please enable the WordPress debug log. This will allow us to see if any PHP errors are being produced.

1. Edit wp-config.php and insert the following lines:

define( 'WP_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'WP_DEBUG_DISPLAY', false );

2. Reproduce the issue.

3. Locate the debug log in: /wp-content/debug.log

4. Paste the latest lines here. No need to paste the entire log file, just 50 lines or so will do. Please censor any sensitive information.

https://codex.wordpress.org/Debugging_in_WordPress

Regards,
Bruno Kos

March 25, 2019 at 9:45 am #3451159

sergeyS-14

I already done this before and there is no any error. This is why i am here to ask if you have any suggestions but as i can understand you dont.

Thank you for you time.

March 25, 2019 at 11:44 am #3452941

Bruno Kos
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+01:00)

Hi,

Don't give up yet :). What I can suggest as this point is that we create a Duplicator package and we (WPML support team) test this locally and then escalate to 2nd tier for an opinion. Let me know if this would work for you.

We are constantly working on improving SQL queries generated by various WPML addons and if there's a room for improvement, our developers take this into account and test various scenario on how to get it done. Sometimes even our clients send us SQL queries that they improved and these get tested, modified or not and implemented into new releases.

Regards,
Bruno Kos

The topic ‘[Closed] SQL Query_time to slow’ is closed to new replies.