Oracle FAQ Your Portal to the Oracle Knowledge Grid
 HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US

Home -> Community -> Usenet -> comp.databases.theory -> Re: Teach SELECT DISTINCT first!

# Re: Teach SELECT DISTINCT first!

From: Dawn M. Wolthuis <dwolt_at_tincat-group.com>
Date: Tue, 27 Apr 2004 20:23:26 -0500
Message-ID: <c6n135\$gaf\$1@news.netins.net>

"Mikito Harakiri" <mikharakiri_at_iahu.com> wrote in message news:b6Djc.50\$BD6.662_at_news.oracle.com...
>
> "Paul" <paul_at_test.com> wrote in message
> news:_mCjc.36950\$Y%6.5035445_at_wards.force9.net...
> > Mikito Harakiri wrote:
> > >> OK here's a pathological example: Define a function f on the
> > >> integers by: f(i) = i (if Fermat's Last Theorem is true
> > >> = 0 (if Fermat's Last Theorem is false
> > >
> > > This is not closed-form expression. Normally you supply a formula
> > > with arithmetic operations and elementary functions.
> >
> > I'm sure you could expand it out in terms of arithmetic operations and
> > elementary functions. It might be very long though...
>
> No, you would need quantifiers.
>
> > > CAS have their own problems even within practical realm of
> > > closed-form expressions, there is no need to go as far as FLT. The
> > > idea is however, that in vast majority of the cases CAS does an
> > > excellent work.
> >
> > OK so say for example I do "SELECT i from R WHERE i*i < 0"
> > where i is an integer column, then the DBMS engine should know that the
> > square of an integer is never less than zero?
>
> Is it really different from today's RDBMS primitive predicate deduction
> capabilities when optimizer derives
>
> x = 5
>
> from
>
> x = y and y = 5 ?
>
> > Maybe the DBMS could store statistics about what actual ranges are used
> > for a function in practice and physically store them which would help in
> > 99% of cases?
>
> Well, likewise, finite precision arithmentics works in 99% of the cases,
but
> as you have seen below I'm not really excited with that kind of approach.
>
> > Yes, I guess the problem is it's very complicated to write just a plain
> > DBMS, let alone one with fancy optimizations, unlimited precision and
> > computer algebra systems etc. built in.
>
> But, you know what? Writing clean RDBMS engine is not even on vendor's
> priority list. They are extremely busy chasing X, G and other fads.

Maybe there were too many years wasted chasing that R fad ;-) --dawn Received on Tue Apr 27 2004 - 20:23:26 CDT

Original text of this message

 HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US