MySQL Forums
Forum List  »  General

Re: Improuve my DB performances on server
Posted by: Peter Brawley
Date: June 10, 2014 01:31PM

> I'm afraid I'll loose performance on mysql's connections because it's not in the same server.

It'll be a very small effect, much smaller than what you're suffering now.

>a part of the query are user's variables :
>AND heure BETWEEN IF(date = '2014-06-01','10:05:00', '00:00:00')
>AND IF(date = '2014-06-10','20:01:00', '23:59:59')

The logic in the Between clause needs to be moved out to the app's query generation code, so the default case does not generate useless table scans.

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.