[eluser]theshiftexchange[/eluser]
Hi guys,
I've got a theoretical question: should I try to reduce the amount of data in my variables been passed to my view?
To explain: I have a db with lots of tables. One table is CustomerProfile. This table has approximately 12 columns of generic data about the customer (nothing secret to the customer who is logged in). Note: the user password etc is not in this table.
Now some of my views only need 2-3 columns of this data to display what I want. My question is; should I just get the whole row of the customerprofile, and pass that to my view, and just use the variables I want? Or should I write a new function in my model, to select only the columns I need, and pass that back?
I'm guessing passing everything causes more memory use on your server, while passing just the columns will cause more sql processing (cpu) (and more programming time since I need to adjust the model)?
Cheers