Speeding up sql queries

Searching for "DATE_ADD(date_add, INTERVAL 30 MINUTE) > now" needs for every line to add 30 minutes to the date. but it is the same operation as comparing "date_add > (now - 30 minutes).
It is faster because there is no DATE_ADD calculation.

The problem:
By profiling speed of my shop, this query appeared after about 3 months always as the absolute slowest query of the shop, needing about 15 to 30 ms to perform, because I have now nearly 700 connections to my shop (and it then browses the 700 lines)

A solution:
Removing DATE_ADD MySql function and using date() and time() functions of php for calculating only once the 30 min. difference.

Using this solution takes it down again to 0.8 to 1.3 ms.

I guess it is the same in case of bots (could be even worse as they can make thousands of connections).
[-] BO : Fix Bug #PSCFV-10331 check all from list
[-] BO : quote badly decoded in customerThreads
Merge pull request #717 from zimmi1/patch-2

[*] CORE : Speeding up sql queries in Connection
Update Connection.php correction from 717

I'm very very sorry, I produced an error with the last commit on this file: there was an error in parenthesis position on line 117. Line 117 should be as line 131.
(But how did I manage to make this wrong ???)
Merge pull request #719 from zimmi1/patch-4

Update Connection.php correction from 717
// small fix
[-] BO ; Fix bug #PSCFV-10393 manufacturer filter
Added ui.button as dependency of ui.dialog

While developing my own module, i've upgraded installation to latest version of PS and impacted a bug:

$('#something').dialog({...}); caused an error: t().button is not a function.



In my php code i had this:
$this->context->controller->addJqueryUI('ui.dialog');

i found that it doesn't load ui.button dependency.

Added 'ui.button' to classes/Media.php at the end of ui.dialog dependencies and all worked fine.
[-] BO : Fix bug #PSCFV-8407 can not customize feature column name if needed
Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
[-] BO : Could not order in AdminStatuses by ID or template
[+] Modules : add hookHome
Merge pull request #723 from codeurWeb/patch-2

[+] MO : Blocknewproducts add hookHome
[-] BO : FixBug #PSCFV-9900 Double quote escape problem in delete button link
Merge branch 'development' of https://github.com/PrestaShop/PrestaShop into development
[-] BO : limited the number of customers displayed in the group view to 100 in order to avoid memory usage error
Merge pull request #720 from makk1ntosh/development

//Added ui.button as dependency of ui.dialog
[-] IN : Fix bug #PSCFV-10382 add_module_to_hook retunrning false when hook not exists
[-] FO : replace ucfirst by ucwords for the customer firstname #PSCFV-10396