At 11:29 AM +0000 7/29/99, Miso Pach wrote:
>On Wed, 28 Jul 1999, Sasha Pachev wrote:
> > Generally processing results on the server is faster than on the client.
> > You can try a benchmark at let us know what happens in your case.
>I will benchmark and let you know. However is this generally
>a good application design - throwing as much processing on
>the database server as possible and do very little work in
>the application program itself? So ideal situation is that
>the database engine returnes the rows in a ready to go
>format and the app will just print them out or something?
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.
+--------------- my people are the people of the dessert, ---------------+
| Steve Edberg Computer Consultant |
| sbedberg@stripped University of California, Davis |
| (530)753-7605 (530)754-9127 |
+---------------- said t e lawrence, picking up his fork ----------------+