Help Center

Powered by Minitek FAQ Book
Loading...

Slow query

MM
Miguel MagalhaesPosted 3 years ago

Hi, my Minitek Wall is working great but it produces slow queries, that with to much accesses load the server up.

 

The problem is the GROUP BY a.id in the end of the query, it's doesn't allow it to use indexes. In my case I do not need this GROUP BY clause:
GROUP BY a.id
ORDER BY publish_up DESC, a.id DESC LIMIT 55;

Just need the ORDER BY, how can I remove the GROUP BY from behing included in the query?

 

Thanks

Loading...
0
#2738

4 answers

M
MinitekPosted 3 years agoModerator

Hi there,

What data source type are you using?

MM
Miguel MagalhaesPosted 3 years agoEdited 3 years ago

Hi Yannis.

 

Source Joomla -> Joomla Articles  -> order By Start Publishing Date (Descending)

 

With the GROUP BY the query takes 6 seconds (The database has 60k articles), without GROUP BY 0.5 seconds.

M
MinitekPosted 3 years agoModerator

I will add an option to disable the GROUP BY in next version. For the moment, you can disable it in the file

/components/com_minitekwall/libraries/source/joomla.php

in line 633. However, this might have unintended consequences.

MM
Miguel MagalhaesPosted 3 years ago

OK, thank you