I have a SQL table Student
. It has 30 columns (properties) for each student.
I need 10 properties in a SQL query.
Which one is better approach ?
q1 = 'SELECT * FROM STUDENTS where uid in %s'%tuple(list1);
for k in properties:
`q1 = 'SELECT k FROM STUDENTS where uid in %s'%tuple(list1);`
Mainly comparison is between single I/O with huge amount of data or multiple I/O with less amount of data
I think the 1st approach is better as in single IO all data will be loaded to memory then iterating over it is faster in memory