Slow DB Query
-
Hi Team
Every time I open open a product to edit in the back end, the YMM plugin runs the following SQL Statement and it take around 7-9 seconds to run and returns the same values for every product I edit.
SELECT DISTINCT IF(LENGTH(postmeta.meta_value)>0, postmeta.meta_value, postmeta.post_id) as product_sku, ymm.make, ymm.model, ymm.year_from, ymm.year_to FROM wp_posts AS posts JOIN wp_postmeta AS postmeta ON postmeta.post_id = posts.ID AND postmeta.meta_key = '_sku' JOIN wp_ymm ymm ON ymm.product_id = posts.ID WHERE posts.post_type = 'product' ORDER BY posts.ID LIMIT 1product_sku make model year_from year_to DP900 HARLEY DAVIDSON 1340 FLHR Road King 1994 1994The Caller of SQL is Pektsekye_Ymm_Model_Db->getVehicleData()
Can anyone tell me why this SQL is executed and returns the same value every time no matter what product I’m editing. I’m wondering if there is some type of error, it just seems to take way to long to open a product to edit.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The topic ‘Slow DB Query’ is closed to new replies.