Is there a difference in terms of performance in doing :
SQL SELECT *
SQL SELECT A,B
Let's say the table has a lot of fields.
Have a good day.
Yes there could be a huge difference if your table has like 100 fields.
I'd say the performance should logically be bettter if, out of a lot of fields in the database_table, you SELECT only the fields that you need. The difference is probably not too much, though, as the preceding LOAD takes only those two fields ...
I have seen data loads go from one hour (Select *) to five minutes (Select A,B). We had a table with 170 fields.
especially if large text fields are included
There will be huge difference between Getting two fields and 100's of fields from database in terms of performance.
As SQL SELECT statement does Implicit LOAD.
additionally to existing answers there is another aspect
Select * requires a full table scan which takes time
select a,b might take use of an index which is much faster
in our case we dropped the load time from 1hour to 5 minutes (select * got 6 fields, later we used select with 2 fields)!
Retrieving data ...