Re: Select * with a function applied to one column
Posted by:
Rick James
Date: December 06, 2014 10:51AM
I see no downside (relative to the alternatives) of SELECT * into an associative array. Do you, Phill?
Dean, yes, many subqueries are performance issues. Some subqueries actually improve performance; they usually involve a GROUP BY or LIMIT, with the complexity (JOIN, etc) carefully split between the subquery and the outer query. In your particular case, I predict a slight performance hit.
> convert all mentions of column ip to column converted_ip in the code
How about a short code kludge:
$assoc_array = ..."SELECT ... AS converted_ip ..."
$assoc_array['id'] = $assoc_array['converted_ip']; -- add this one-liner.
(It's not as clean as your suggestions, but it is only one line.)
Subject
Written By
Posted
December 03, 2014 01:16AM
December 03, 2014 06:33AM
December 04, 2014 02:49AM
December 04, 2014 06:35AM
December 04, 2014 09:46AM
December 06, 2014 04:31AM
Re: Select * with a function applied to one column
December 06, 2014 10:51AM
December 08, 2014 06:37AM
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.