At 03:38, 19990729, Steve Edberg wrote:
>At 11:29 AM +0000 7/29/99, Miso Pach wrote:
>>On Wed, 28 Jul 1999, Sasha Pachev wrote:
>Yes, _in general_ it is best to do as much processing on the database
>server, because (1) it usually minimizes the amount of data sent from
>the DB server to your application/web server (can be important if
>you're using two physically separate servers), and (2) database
>software is designed specifically to optimize queries to minimize
>response time & memory use. DB engines know something about each
>table, so they can use intelligently use indexes to reduce the number
>of records that need to be examined. You can see how MySQL does this
>via the EXPLAIN command.
I would agree, and say that often the db server machine is a much
more capable processor than the client. But that's not always
the case, especially now that we have really cheap machines that
are running at over 400 MHz and have 128M of RAM. So if your
server performance is slow, it might be good to distribute the
work load by doing a lot of work in the client.
Of course it just depends on your setup. But I think that sorting,
selecting, etc. is much better done in the server (as said above),
but performing normal "procedural" things on the data are best done
in the client. Your specific question was a mix of those things.
Tim