You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Jason Huynh <jh...@pivotal.io> on 2018/10/01 16:04:30 UTC

Re: Queries on key fields

I think if you embed the sessionId into your value object and create an
index, that should perform better.  I am assuming if you embed the sesionId
that you would then be doing queries more similar to sessionId = X or
sessionId like sessionId%.  Being able to use the index will prevent the
query engine from having to do a full region scan.

For the like query, a % matcher preceding the value will also slow down the
engine because it will have to scan a lot more of the region to find any
possible matches.  So %sessionId% will perform worse than sessionId%,
especially with an index.

Using PDX to serialize the value object would also help.


On Sat, Sep 29, 2018 at 11:13 AM siby_sekar <si...@hotmail.com> wrote:

> for us sessionId is not the actual key field.
>
> It will be something like some arbitrarystring+sessionid
>
> and we will be running queries  with - like "%sessionId%" to find all
> entries  having a particular sessionid.
>
> In this case to improve performance can we apply any index ?
>
> is this approach better than running queries on value fields with PDX
> Serialization ?
>
>
>
> --
> Sent from:
> http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
>

Re: Queries on key fields

Posted by Jason Huynh <jh...@pivotal.io>.
Hello Siby,

I think we should keep this conversation based on Geode if possible.  I
think GemFire has their own support channels that you might be able to
contact for help specific to GemFire...
As for the commit conflicts, I assume you are using transactions?  Also, I
am not aware of a specific Map feature, would you be able to provide the
api call and maybe a bit more information about the usage?

Is this related to index/queries at this point or should this be spun into
another thread?




On Mon, Oct 15, 2018 at 12:22 PM anjana_nair <si...@hotmail.com>
wrote:

> Jason,
>
> We are using the Map feature of GemFire and update throws CommitComflict
> exceptions when the same key is updated from multiple places at the same
> time, how can this be resolved ? This happens only at high contention
> though. We are  retrying , but still even after a couple of retries it does
> not get successful.
>
> What can be done ?
>
>
>
> --
> Sent from:
> http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
>

Re: Queries on key fields

Posted by anjana_nair <si...@hotmail.com>.
Jason,

We are using the Map feature of GemFire and update throws CommitComflict
exceptions when the same key is updated from multiple places at the same
time, how can this be resolved ? This happens only at high contention
though. We are  retrying , but still even after a couple of retries it does
not get successful.

What can be done ?



--
Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/

Re: Queries on key fields

Posted by anjana_nair <si...@hotmail.com>.
thank you that clarifieded my queries.



--
Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/

Re: Queries on key fields

Posted by Jason Huynh <jh...@pivotal.io>.
Pdx and indexing are different altogether.  Pdx affects the serialization
of the object.  Indexing affects querying speed.  Together, they should
improve the entire query speed because querying can cause
deserializations.  With Pdx it should speed up look ups by not causing full
deserialization per field looked up.

Both are able to be used together.

On Tue, Oct 9, 2018 at 1:21 PM anjana_nair <si...@hotmail.com> wrote:

> is there an advantage of using one vs other
>
>
> index on a field vs PDX serialization as both are used in query  execution.
>
>
>
> --
> Sent from:
> http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
>

Re: Queries on key fields

Posted by anjana_nair <si...@hotmail.com>.
is there an advantage of using one vs other


index on a field vs PDX serialization as both are used in query  execution.



--
Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/

Re: Queries on key fields

Posted by anjana_nair <si...@hotmail.com>.
Jason,

how can we use both together, isnt it redundant as both serve the same
purpose ? making retrieval faster ?



--
Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/

Re: Queries on key fields

Posted by Jason Huynh <jh...@pivotal.io>.
The index and pdx serialization are orthogonal.  You will be able to use
both together

On Tue, Oct 2, 2018 at 10:50 AM siby_sekar <si...@hotmail.com> wrote:

> Thank you Jason that was really helpful.
>
> Can we use index and PDXSerialization together on a field. Here in this
> case
> we will be searching by sessionId,
> but should we assign just PDxSerialization or index or can we use both on
> sessionId ?
>
> thanks,
> Siby.
>
>
>
> --
> Sent from:
> http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
>

Re: Queries on key fields

Posted by siby_sekar <si...@hotmail.com>.
Thank you Jason that was really helpful.

Can we use index and PDXSerialization together on a field. Here in this case
we will be searching by sessionId, 
but should we assign just PDxSerialization or index or can we use both on
sessionId ?

thanks,
Siby.



--
Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/