MySQL Forums
Forum List  »  Newbie

Re: Re-writing sql code using another column to get same result
Posted by: Phillip Ward
Date: August 07, 2018 09:52AM

Possible? Sure.
Performant? Not so much.

You're calling a function on a field value and the only way the database can work out what the result is going to look like is to call it for each and every row in turn, i.e. your query is going to Table Scan and, for data of any real size, your application will slow to a crawl.

Store your data in the right Data Types.

Regards, Phill W.

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.