Hello
I’m using google translate.sorry for it.
My support hosting sent below codes to me and told the sending query time to database takes about 20 seconds. how cai i decrease the query time for this theme?
# Time: 180619 21:02:51
# User@Host: xgdxhapt_bina[xgdxhapt_bina] @ localhost []
# Thread_id: 256 Schema: xgdxhapt_ali QC_hit: No
# Query_time: 20.668969 Lock_time: 0.000188 Rows_sent: 1 Rows_examined: 2614179
# Rows_affected: 0
use xgdxhapt_ali;
SET timestamp=1529425971;
SELECT COUNT( DISTINCT wp_posts.ID ) as range_count FROM wp_posts
INNER JOIN wp_term_relationships AS term_relationships ON wp_posts.ID = term_relationships.object_id
INNER JOIN wp_term_taxonomy AS term_taxonomy USING( term_taxonomy_id )
INNER JOIN wp_terms AS terms USING( term_id )
INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id )
WHERE wp_posts.post_type IN ( ‘product’ )
AND wp_posts.post_status = ‘publish’
AND wp_postmeta.meta_key = ‘_price’ AND CAST(wp_postmeta.meta_value AS DECIMAL) BETWEEN ‘0’ AND ‘694500’
AND (
wp_posts.ID NOT IN (
SELECT object_id