Make WordPress Core

Opened 20 months ago

Last modified 20 months ago

#57283 new defect (bug)

Postmeta - Performance Improvement - Woocommerce

Reported by: kapil4sam's profile kapil4sam Owned by:
Milestone: Awaiting Review Priority: normal
Severity: critical Version: 6.1.1
Component: Database Keywords:
Focuses: Cc:

Description

Hi Team,

Struggling since almost a month to find the solution for slow search in woocoomerce. Tried verious different things like speed up index mysql. Changing mysql version from 5.7 to 8.x.
Updated index - added high performance keys for post meta table.

When backend team search for orders from woocommerce-orders tab - it takes almost 3 min to get the results.

Looking for inputs from wordpress community and help for the same.

Change History (3)

#1 @kapil4sam
20 months ago

SELECT DISTINCT p1.post_id
FROM wpuo_postmeta p1
WHERE p1.meta_value LIKE '%123456%'
AND p1.meta_key IN ('_billing_address_index','_shipping_address_index','_billing_last_name','_billing_email','_order_number')

Above is the query which is taking too much of time.

#2 @pravinparmar2404
20 months ago

  • Component changed from General to Database

Attached Slow Queries screenshot from Query Monitor

https://prnt.sc/SyEJa0syyTnw

#3 @uzumymw
20 months ago

Usually DISTINCT leads to a big slowdown.

Note: See TracTickets for help on using tickets.