trafodion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Owhadi <eric.owh...@esgyn.com>
Subject RE: question on normalization
Date Mon, 14 Dec 2015 22:31:15 GMT
The pushdown feature is not smart. It will push it down no matter what stats
says, but it will push it as A>1 or a<1 instead of A!=1.
That will be 2 compare ops plus the overhead of the fact that predicates are
not in "native code". I think I will optimize if I have time, instead of
debating how worthwhile it is to do so...
Thanks all for the valuable insights,
Eric
-----Original Message-----
From: Dave Birdsall [mailto:dave.birdsall@esgyn.com]
Sent: Monday, December 14, 2015 4:25 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: question on normalization

Hi,

Is it worth it? It depends on the distribution of values for the column. If
the predicate is A <> 1, and half the values in the column are 1 (either
because of a small UEC or because of skew) then pushing it down seems
worthwhile.

If the UEC is 1,000,000 and there is no skew, it probably doesn't matter.
But it doesn't hurt to push it down. It is one less predicate to evaluate in
the executor.

Dave

-----Original Message-----
From: Eric Owhadi [mailto:eric.owhadi@esgyn.com]
Sent: Monday, December 14, 2015 1:54 PM
To: dev@trafodion.incubator.apache.org
Subject: RE: question on normalization

It would be simple for pushdown to transform back to != when we are about to
turn it to a scan predicate push down.
Is it worth doing it? Or too small of an optimization?
Eric


-----Original Message-----
From: Qifan Chen [mailto:qifan.chen@esgyn.com]
Sent: Monday, December 14, 2015 3:41 PM
To: dev <dev@trafodion.incubator.apache.org>
Subject: Re: question on normalization

yes, if you turn off range spec, the != remains un-transformed.

Thanks --Qifan

On Mon, Dec 14, 2015 at 3:36 PM, Dave Birdsall <dave.birdsall@esgyn.com>
wrote:

> I don't know for sure, but I'll speculate that histogram estimation
> and RangeSpec processing in the compiler like to think in terms of
> intervals.
>
> -----Original Message-----
> From: Hans Zeller [mailto:hans.zeller@esgyn.com]
> Sent: Monday, December 14, 2015 1:35 PM
> To: dev <dev@trafodion.incubator.apache.org>
> Subject: Re: question on normalization
>
> Hi Eric, yes, the logic may be unconditional, since at the time when
> we do these transformations, we don't know yet whether the predicate
> is used in an alternate index or not, and since the overhead of the
> extra predicate is probably small.
>
> Hans
>
> On Mon, Dec 14, 2015 at 1:31 PM, Eric Owhadi <eric.owhadi@esgyn.com>
> wrote:
>
> > Sorry should have said that "an" is not a key column. So any logic
> > around MDAM should not apply.
> > Eric
> >
> > -----Original Message-----
> > From: Hans Zeller [mailto:hans.zeller@esgyn.com]
> > Sent: Monday, December 14, 2015 3:30 PM
> > To: dev <dev@trafodion.incubator.apache.org>
> > Subject: Re: question on normalization
> >
> > Hi Eric, this is probably to get usable key predicates. "an <> 1" is
> > not a key range we could use, but "an < 1" and "an > 1" make two
> > disjuncts for an MDAM scan.
> >
> > Hans
> >
> > On Mon, Dec 14, 2015 at 1:25 PM, Eric Owhadi <eric.owhadi@esgyn.com>
> > wrote:
> >
> > > I am implementing predicate push down enhancement. doing so, I
> > > found something weird.
> > >
> > > If I do select an from t132 where an != 1
> > >
> > > The normalized predicate is ((an < 1) or <an >1))
> > >
> > > I would have expected a simple an <> 1
> > >
> > > There is probably a reason being this? But what is it?
> > >
> > > Thanks in advance for the help,
> > > Eric
> > >
> >
>



--
Regards, --Qifan

Mime
View raw message