W dniu 2015-03-12 13:55:16 użytkownik liviuslivius
<[email protected]> napisał:
>
>
> W dniu 2015-03-12 13:24:32 użytkownik Dmitry Yemanov <[email protected]>
> napisał:
> > 12.03.2015 15:13, liviuslivius wrote:
> > >
> > > is possible to extend this to show
> > >
> > > Range Scan (lower bound: 1/1, upper bound: 1/1) + (partial match: 1/2)
> > >
> > > like
> > > Range Scan (partial match: 1/2, lower bound: 1/1, upper bound: 1/1)
> > >
> > > e.g.
> > > compound index
> > >
> > > CREATE INDEX INDEX_NAME AAA ON XXX(A, B);
> > >
> > > SELECT
> > > *
> > > FROM
> > > XXX X
> > > WHERE
> > > X.A>10 AND X.A<15
> > >
> > > here we have partial index use(only A field) but also lower/upper bound
> >
> > It should report: lower bound: 1/2, upper bound: 1/2.
> > Here 1/2 means a partial match.
> >
> >
> > Dmitry
> >
> >
>
>
> Hi Dmitry,
>
> then i do not understand this as i supposed before
> can you explain me how this work in this examples - especially last two
>
> [1]
> X.A > 51 AND X.A<53 and X.B = '2014.12'
> Range Scan (lower bound: 1/1, upper bound: 1/1)
>
> [2]
> X.A > 51 AND X.A<53 and X.B >= '2013.08' and X.B <= '2014.12'
> Range Scan (lower bound: 1/1, upper bound: 1/1)
>
> [3]
> X.A = 51 and X.B >= '2013.08' and X.B <= '2014.12'
> Range Scan (lower bound: 2/2, upper bound: 2/2)
>
> [4]
> X.A = 51 and X.B >= '2013.08'
> Range Scan (lower bound: 2/2, upper bound: 1/2)
>
> [5]
> X.A = 51 and X.B <= '2013.08'
> Range Scan (lower bound: 1/2, upper bound: 2/2)
>
>
> regards,
> Karol Bieniaszewski
>
Sorry for for previous post- i test on table with more then one indexes ;-)
i only have question with this:
CREATE TABLE XXX
(
A INTEGER,
B INTEGER,
C INTEGER,
D INTEGER,
E INTEGER
);
CREATE INDEX IXA_XXX__ALL ON XXX(A, B, C, D, E);
SELECT
*
FROM
XXX X
WHERE
X.A=5
AND X.B=6
AND X.C>6
Range Scan (lower bound: 3/5, upper bound: 2/5)
SELECT
*
FROM
XXX X
WHERE
X.A=5
AND X.B=6
AND X.C<6
Range Scan (lower bound: 2/5, upper bound: 3/5)
regards,
Karol Bieniaszewski
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel