I am new to coding.I got a requirement where the user could see the columns available in the table. And then he selects only few of the columns to see the data.
So I am planning to put a check box to every column so whatever the columns selected by the user we can identify.But the problem is how can I write a query after taking the database connection
for dynamic selection of columns?
Please suggest me the ways to do this.
Thanks in advance.
@Bear Bibeault .IS it a Pre mature optimization really?
Sorry if i dint ask the size of the application here..
It is well known that selecting 100 column is much slower than selecting 10 cloumns.So Is it not good to think usr will not need all columns always?
I am not questioning you ..problem here is about the design of the application...
Thinking all possible overhead (at least expected ones)is also a good way of design i believe.
Is above not true?
Bear Bibeault wrote:Worrying about overhead before it's known that there's something to worry about is called premature optimization and should be avoided. Do what makes the most sense, and then, and only then, if there's a performance issues, address it.
It is well known that selecting 100 column is much slower than selecting 10 cloumns
We are talking about hypothetical numbers here. Do we really know that the OP is dealing with such numbers ? It is always easier to choose the simplest solution and then chisel away at it if necessary.