Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

what's a better code design priciple?



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).




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org