what's a better code design priciple?

John Abreau jabr at blu.org
Thu Jun 1 17:22:04 EDT 2000


On Tue, 30 May 2000, Christoph Doerbeck A242369 wrote:

> 
> Hey folks,
> 
> I am at a cross roads in the development of a little application.
> What's better in the interest of performance and (more importantly) code
> maintainability?
> 
> 	a) use multiple simple SQL queries requiring additional code 
> 	b) increase SQL complexibilty, use one query and reduce code size
> 
> Comments?  Obviously it's tough to gauge the best solution without knowing
> my design in detail, but I was wondering if there were some hacker
> standards I should go by...

My experience has been that the additional code adds a huge overhead as
the data size increases. In an application I wrote at Polaroid, when I was
just beginning to dabble in SQL, I kept the SQL simple and wrote the
hairier pieces in perl, and the application didn't scale well to 1000
records. When I reimplemented those parts in SQL, it scaled comfortably to
10,000 records, and performed about 1000 times faster than the prior
version with 1000 records.

--
John Abreau / Executive Director, Boston Linux & Unix 
Email: jabr at blu.org / URL: http://www.blu.org
ICQ#28611923 / AIM abreauj
-----------------------------------------------------------------------
"Working with NT is like trying to tune a watch wearing oven mitts.
 You can't get your fingers inside like you can with UNIX.
-----------------------------------------------------------------------

-
Subcription/unsubscription/info requests: send e-mail with
"subscribe", "unsubscribe", or "info" on the first line of the
message body to discuss-request at blu.org (Subject line is ignored).



More information about the Discuss mailing list