Re: Just for the record
Date: Sat, 01 Jul 2006 19:58:44 GMT
Message-ID: <UtApg.4730$pu3.110289_at_ursa-nb00s0.nbnet.nb.ca>
David Cressey wrote:
> <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.
In a better world, this would be the role of the optimizer.
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.
I suggest that 'bearing in mind' is perhaps misleading. A better phrase
might be 'acknowledging'. Separating concerns means dealing with a
concern to the exclusion of all other concerns while still acknowledging
the importance of those other concerns.
Performance tuning might then be the process of addressing efficiency
through symbolic transformation among equivalent correct queries to
create a fast one from a clear one.