Re: Just for the record

From: David Cressey <dcressey_at_verizon.net>
Date: Sat, 01 Jul 2006 13:09:32 GMT
Message-ID: <guupg.191$b9.93_at_trndny01>


<kvnkrkptrck_at_gmail.com> wrote in message news:1151522748.914377.59710_at_d56g2000cwd.googlegroups.com...

> Dijkstra: SOC = When solving a complex problem, focus on one aspect of
> the problem (correctness, efficiency, etc.) while bearing in mind that
> the other aspects exist.

I really like this!

I hope you won't mind if add a tangential comment.

Many of the disastrous database designs that I've seen in the SQL world stem from a premature preoccupation with efficiency, at the expense of sufficient attention to either relevance or correctness.

This is particularly true when it comes to database design, but it's also truw about query design.

A number of times, people have come to me with a SELECT that they want speeded up. While playing with the query, I happen to notice that SELECT can give wrong answers, where SELECT DISTINCT will give right answers. When I point this out to my consultee, he says, "yes but that's even slower!" To me, this is putting the cart before the horse.

To me, tuning a query is selecting a fast query among all the correct queries. If a query is known to be incorrect, that disqualifies it.

However, and this is somewhat new to me, is the idea of bearing in mind that all the other aspects exist. I like database design to be simple and sound, especially at the early stages. But even at the early stages, there is some sense that the final result is going to have to perform up to some required level. Received on Sat Jul 01 2006 - 15:09:32 CEST

Original text of this message