To Rakesh
J. Laurindo Chiappa, November 08, 2017 - 12:32 pm UTC
Another possible source of performance diff could be an Index in this columns A,B and C : if all the columns cited in the SELECT are present in a given index, the RDBMS can bring back the data only reading the index, while if you use an * in the SELECT, the RDBMS will NEED to access the table itself...
But if no index with the desired columns exists, no practical diff (performance-wise) in using * ou indicating the columns....
Best regards,
Chiappa
November 09, 2017 - 1:43 am UTC
This question says the table only contains the columns queried (a,b,c) but definitely a valid point.
As a general rule, I prefer anyone coding to use
select [cols]
in preference to
select *
unless they are selecting into a %rowtype variable.
Table/join elimination
lh, November 09, 2017 - 8:53 am UTC
Hi
If there exists more columns in table/view than actually are needed in select's column list, then
using * could disable possible table/join elimination.
lh