[thelist] [mysql] condensing queries
Ken Moore
psm2713 at hotmail.com
Tue Nov 4 08:07:35 CST 2003
Hi all,
You wrote:
>firstly, is it a good idea to create a single, but more complex query - or
>should i stick to several simple ones?
As a database programmer of 20 years, I can tell you that KISS is the plan
to follow. Keep it as simple as possible for several reasons.
1. Two or three simple queries can completed in less time than complex
queries. In MS SQL, for example, a badky designed query can take many, many
times as long as the shorter queries to do the same thing.
2. You can combine or reuse the simple queries in different ways.
3. Some progammers are like stunt drivers (or C++ programmers) in that they
think the more complicated, the more un-readable, the closer to an accident
you can come without havint one, the better you are. I do not agree.
4. 6 months from now, you or someone else may want to read it and actually
understand it.
Ken - Who has misled myself too often.
_________________________________________________________________
Concerned that messages may bounce because your Hotmail account is over
limit? Get Hotmail Extra Storage! http://join.msn.com/?PAGE=features/es
More information about the thelist
mailing list