Re: Hashing for DISTINCT or GROUP BY in SQL

From: Cimode <cimode_at_hotmail.com>
Date: Mon, 18 Oct 2010 08:45:37 -0700 (PDT)
Message-ID: <6de63f6f-3934-4128-b368-184f97ef505e_at_w19g2000yqb.googlegroups.com>


[Snipped]
> When a constraint applies to a relation (or maybe I should say when a
> relation satisfies a constraint), how and when can we apply the
> constraint solely to a restriction or projection of the relation and
> know that the constraint is still satisfied by the relation?  
Precisely. And whatelse, appart from a *mathematical* computing model or relational implementation, can tell us that such method is actually a preferable way to encode facts ? I have not seen a single line of coherent work involving relation cardinalities in equations to quantify logical IO's in a meaningful way to be represented on a linear adress scheme.

> There are
> lots of extant adhoc re-writings used by various 'optimizers', some of
> which are have more formal underpinnings than others, such as the
> re-writing of a disjunctive query into a conjunctive form.
> Traditionally, both human and machine 'optimizers' have used metrics
> which I would classify as fairly crude, akin to what engineers call
> 'first approximations', the most common one being the counting of
> physical I/O's.
Precisely. 
A symptomatic example of immaturity of database science is the inability of actually defining *under which physical conditions*, the logical implementation is both possible and by what criteria it could be considered sound. We should not count physical IO's but rather the opposite. Logical IO's should be counted then reduced as a part of a mathematical computing model.

> A typical 'recipe' first looks for a few 'ingredients'
> such as keys followed by physical indexes and some will compare
> alternate indexes before 'deciding'.  Not many will eliminate redundancy
> in a query or constraint.  Optimization progress seems to involve
> whittling away at special cases.  I suspect the re-writing usually
> consists of re-writing queries, not the relations being queried.  Just
> musing out loud.- Masquer le texte des messages précédents -
Recipes. That's is exactly where we are at, regarding implementation: cooking. Received on Mon Oct 18 2010 - 17:45:37 CEST

Original text of this message