Asc and desc index on same field.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Asc and desc index on same field.

Alexey Kuznetsov-2
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
Reply | Threaded
Open this post in threaded view
|

Re: Asc and desc index on same field.

dsetrakyan
Sergi, this seems like a reasonable fix. Is it hard to do?

D.

On Mon, Oct 19, 2015 at 9:19 PM, Alexey Kuznetsov <[hidden email]>
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
>
Reply | Threaded
Open this post in threaded view
|

Re: Asc and desc index on same field.

Sergi
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 <[hidden email]>:

> Sergi, this seems like a reasonable fix. Is it hard to do?
>
> D.
>
> On Mon, Oct 19, 2015 at 9:19 PM, Alexey Kuznetsov <[hidden email]
> >
> 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
> >
>