[Solar-talk] select '*' vs. select $cols

Rodrigo Moraes rodrigo.moraes at gmail.com
Thu Feb 8 10:08:46 PST 2007


Hey,

I made some benchmarks comparing selecting an entire row of data and
some columns. I've been taking care of selecting only what is needed
in a database, because it results in big performance improvements in
most common cases. Here's the benchmark:

    http://solarphp.org/wiki/SandBox
    (needed to format it; didn't knew where to place it; well - it's
on the sand box)

In many cases you only need a partial row to display a list, or to get
a simple data from a foreign table; normally I only need the entire
row when it is being edited. Besides caching and having good indexes,
this is the biggest performance improvement I'm aware of.

This is of course just to reinforce my request to add the possibility
to select columns is the new Solar_Model. Please let me know if I'm
missing something and this is not necessary. :)

rodrigo


More information about the solar-talk mailing list