PluginUs.Net - Business Tools for WooCommerce and WordPress

[realize your idea - make your dreams come true]

Support Forum

You need to log-in to create request (topic) to the support

error and very slow query

The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday. If you have problems with registration ask help on contact us page please
If you not got email within 24~36 business hours, firstly check your spam box, and if no any email from the support there - back to the forum and read answer here. DO NOT ANSWER ON EMAILS [noreply@pluginus.net] FROM THE FORUM!! Emails are just for your info, all answers should be published only here.
The support doesn work on Saturdays and Sundays, so some Friday requests can be answered on Monday.

Dear Realmag!

 

Im having a error and i need your help with it. The search is so slow nobody is buying from the site. There are two querys that are super slow:

SELECT min( FLOOR( price_meta.meta_value + 0.0) ) as min_price, max( CEILING( price_meta.meta_value + 0.0) )as max_price
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfipostmeta as price_meta
ON wp_topdiscfiposts.ID = price_meta.post_id
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE wp_topdiscfiposts.post_type = 'product'
AND wp_topdiscfiposts.post_status = 'publish'
AND price_meta.meta_key IN ('_price')
AND price_meta.meta_value > ''
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814) )

 

QueryCallerTime
SELECT tt.id, CASE
WHEN ot.original is NULL
THEN tt.original
ELSE NULL
END as tt_original, tt.translated, tt.domain AS tt_domain, tt.plural_form, tt.original_id AS tt_original_id, ot.original, ot.domain, ot.context
FROM `wp_topdiscfitrp_gettext_fi` AS tt
LEFT JOIN `wp_topdiscfitrp_gettext_original_strings` AS ot
ON tt.original_id = ot.id

  1. TRP_Query->get_all_gettext_strings
0,0504
SELECT SQL_CALC_FOUND_ROWS wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
WHERE 1=1
AND ( wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (7,9) )
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6,7) )
AND wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814) )
AND ((wp_topdiscfiposts.post_type = 'product'
AND (wp_topdiscfiposts.post_status = 'publish'
OR wp_topdiscfiposts.post_status = 'acf-disabled'
OR wp_topdiscfiposts.post_status = 'wfob-disabled'
OR wp_topdiscfiposts.post_status = 'wfocu-disabled'
OR wp_topdiscfiposts.post_status = 'private')))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.menu_order ASC, wp_topdiscfiposts.post_title ASC
LIMIT 0, 24

  1. WP_Query->get_posts

Main Query

0,1338
SELECT object_id, term_taxonomy_id
FROM wp_topdiscfiterm_relationships
INNER JOIN wp_topdiscfiposts
ON object_id = ID
WHERE term_taxonomy_id IN (4146,4174,4143,1806,3542,3814,3474,3495,3802,2861,1808,368,1811,1810,1809,365,1824,1773,1772,1869,1846,1848,1845,1830,1763,1893,1760,1761,1762,1759,1807,1866,1758,1754,1755,1756,1757,1826,1840,1813,2195,1814,1841,1815,1843,1816,1819,1821,1828,1822,1831,1823,1902,1901,1853,1854,1852,1764,1833,1835,1829,1836,1827,1817,4070,3868,3022,3148,1847,1898,1861,1820,1825,1834,1842,1850,1832,1837,3783,3827,3828,3829,3830,2724,3993,2750,498,542,2630,1723,1787,1788,2621,3520,3598,3635,3815,3725,3790,4047,2249,4084,2625,3842,3841,4080,3473,3496,3212,2628,3323,2626,1900,656,1868,1897,1722,850,1168,1921,1800,1892,678,4059,4063,4071,4065,2339,369,366,147,73)
AND post_type IN ('product')
AND post_status = 'publish'

  1. _pad_term_counts
0,0514
SELECT wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE 1=1
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (1754,1755,1756,1757,1758,1807,1866)
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6) ) )
AND wp_topdiscfiposts.post_type = 'product'
AND ((wp_topdiscfiposts.post_status = 'publish'))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.post_date DESC

  1. WP_Query->get_posts
0,1230
SELECT wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE 1=1
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (1809)
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6) ) )
AND wp_topdiscfiposts.post_type = 'product'
AND ((wp_topdiscfiposts.post_status = 'publish'))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.post_date DESC

  1. WP_Query->get_posts
0,0623
SELECT wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE 1=1
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (1764,1823,1852,1853,1854,1901,1902)
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6) ) )
AND wp_topdiscfiposts.post_type = 'product'
AND ((wp_topdiscfiposts.post_status = 'publish'))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.post_date DESC

  1. WP_Query->get_posts
0,0594
SELECT wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE 1=1
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (1772,1773,1824,1845,1846,1848,1869)
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6) ) )
AND wp_topdiscfiposts.post_type = 'product'
AND ((wp_topdiscfiposts.post_status = 'publish'))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.post_date DESC

  1. WP_Query->get_posts
0,0881
SELECT wp_topdiscfiposts.ID
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE 1=1
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (378)
AND wp_topdiscfiposts.ID NOT IN (
SELECT object_id
FROM wp_topdiscfiterm_relationships
WHERE term_taxonomy_id IN (9,6) ) )
AND wp_topdiscfiposts.post_type = 'product'
AND ((wp_topdiscfiposts.post_status = 'publish'))
GROUP BY wp_topdiscfiposts.ID
ORDER BY wp_topdiscfiposts.post_date DESC

  1. WP_Query->get_posts
0,0560
SELECT min( FLOOR( price_meta.meta_value + 0.0) ) as min_price, max( CEILING( price_meta.meta_value + 0.0) )as max_price
FROM wp_topdiscfiposts
LEFT JOIN wp_topdiscfipostmeta as price_meta
ON wp_topdiscfiposts.ID = price_meta.post_id
LEFT JOIN wp_topdiscfiterm_relationships
ON (wp_topdiscfiposts.ID = wp_topdiscfiterm_relationships.object_id)
LEFT JOIN wp_topdiscfiterm_relationships AS tt1
ON (wp_topdiscfiposts.ID = tt1.object_id)
WHERE wp_topdiscfiposts.post_type = 'product'
AND wp_topdiscfiposts.post_status = 'publish'
AND price_meta.meta_key IN ('_price')
AND price_meta.meta_value > ''
AND ( wp_topdiscfiterm_relationships.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814)
AND tt1.term_taxonomy_id IN (365,368,1754,1755,1756,1757,1758,1759,1760,1761,1762,1763,1764,1772,1773,1806,1807,1808,1809,1810,1811,1813,1814,1815,1816,1819,1821,1822,1823,1824,1826,1827,1828,1829,1830,1831,1833,1835,1836,1840,1841,1843,1845,1846,1848,1852,1853,1854,1866,1869,1893,1901,1902,2195,2861,3474,3495,3542,3802,3814) )

17 seconds... please can you check my website login and fix it

I disabled the plugin, but when you check the site you can enable it and go to any database (shop)

Hello

Please paste your license key here - https://share.pluginus.net/image/i20230222134241.png -> https://share.pluginus.net/image/i20230222134511.png

Read this - https://products-filter.com/searching-is-slow

license pasted

OK!

Have you tried the solutions from the article?
Have you enabled caching for prices?

I did what in the website. Didnt help. I use a good host (siteground ) 8 + 8 seconds for the same terms. Can you have a look?

Hello

Ok!  I made the recommended settings My  test - https://share.pluginus.net/video/v20250411121810.mp4  - there is practically no difference in loading a page with or without the plugin

brilliant. I dont know what I did wrong, but now everything is great.

 

Another question,   is it possible to add the search to mobile button navbar?

 

i tried putting the shortcode but didnt work.

 

I want that there is a button for the search right away for the mobile. now its quite hidden

 

Thanks a lot again for fixing plugin. great support

 

 

https://c2n.me/4mycVHg.png  - This is a third-party functionality and how to transfer it to the menu you better ask the author of this functionality