Plugin optimization
-
Hi, we are experiment issues with this plugin version pro, we have the next issue
The database query is very intensive, its doing a full table scan on wp_postmeta which is over 500MB in size and has 1,386,064 rows.
Problematic query:
SELECT MIN(CAST(meta_value as SIGNED)) FROM wp_postmeta WHERE meta_key LIKE ‘_price’
EXPLAIN SELECT MIN(CAST(meta_value as SIGNED)) FROM wp_postmeta WHERE meta_key LIKE ‘_price’;
+——+————-+————-+——+—————+——+———+——+———+————-+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+——+————-+————-+——+—————+——+———+——+———+————-+
| 1 | SIMPLE | wp_postmeta | ALL | NULL | NULL | NULL | NULL | 1385887 | Using where |
+——+————-+————-+——+—————+——+———+——+———+————-+You can see each time the query is ran, it scans through all 1385887 rows of data.
The code needs to be optimized
-get_var() /wp-content/plugins/ajax-search-pro/includes/functions/functions.php:2071
-asp_parse_custom_field_filters() /wp-content/plugins/ajax-search-pro/includes/functions/functions.php:1613
-asp_parse_filters() /wp-content/plugins/ajax-search-pro/includes/classes/shortcodes/class-asp-search.php:240Can you help us to optimize the quey?
Best regards
- The topic ‘Plugin optimization’ is closed to new replies.