You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ignite.apache.org by Alexey Kuznetsov <ak...@gridgain.com> on 2015/10/20 06:19:23 UTC

Asc and desc index on same field.

Igniters,

I found that I cannot have asc and desc index on same field (exception will
be thrown).
This happen because we give index name as field name without
Asc/Desc/UUID/global_Id suffix.

All databases allow to have asc and desc index on same field. We could
easily support this in Ignite too.

Thoughts?

-- 
Alexey Kuznetsov
GridGain Systems
www.gridgain.com

Re: Asc and desc index on same field.

Posted by Sergi Vladykin <se...@gmail.com>.
I don't really like the idea of having the same index twice because it will
consume 2x memory and rarely useful.
H2 API does not allow to use the same index for ASC and DESC scans, but
probably we can automatically add supplementary fake index which will share
the same data structures as original one but for H2 engine it will look
like additional reverse ordered index.

Sergi

2015-10-21 5:10 GMT+03:00 Dmitriy Setrakyan <ds...@apache.org>:

> Sergi, this seems like a reasonable fix. Is it hard to do?
>
> D.
>
> On Mon, Oct 19, 2015 at 9:19 PM, Alexey Kuznetsov <akuznetsov@gridgain.com
> >
> wrote:
>
> > Igniters,
> >
> > I found that I cannot have asc and desc index on same field (exception
> will
> > be thrown).
> > This happen because we give index name as field name without
> > Asc/Desc/UUID/global_Id suffix.
> >
> > All databases allow to have asc and desc index on same field. We could
> > easily support this in Ignite too.
> >
> > Thoughts?
> >
> > --
> > Alexey Kuznetsov
> > GridGain Systems
> > www.gridgain.com
> >
>

Re: Asc and desc index on same field.

Posted by Dmitriy Setrakyan <ds...@apache.org>.
Sergi, this seems like a reasonable fix. Is it hard to do?

D.

On Mon, Oct 19, 2015 at 9:19 PM, Alexey Kuznetsov <ak...@gridgain.com>
wrote:

> Igniters,
>
> I found that I cannot have asc and desc index on same field (exception will
> be thrown).
> This happen because we give index name as field name without
> Asc/Desc/UUID/global_Id suffix.
>
> All databases allow to have asc and desc index on same field. We could
> easily support this in Ignite too.
>
> Thoughts?
>
> --
> Alexey Kuznetsov
> GridGain Systems
> www.gridgain.com
>