Re: Queries on key fields
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 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
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
thank you that clarifieded my queries. -- Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
Re: Queries on key fields
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 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
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
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
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 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
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
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 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
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
Thank you. I have more queries on the topic. we will be applying queries like 1. key like "%sessionID% as sessionid will not be the actual key. we will have several objects where same sessionid is going to be part of multiple objects and we will have to get all objects that contains a particular sessionid and aggregate results on client. So we will be running queries like key like "%sessionId%". In this case should we assign any index on the key fileds as key is not actual sessionid but a concatenation of some string and sessionid ? 2. Also we can have sessionid as part of the value field and then apply PDX serialization on the value objects and run queries and can have = comparison on value objects. Would this be faster than running queries on key fields. If we can run queries on key fields itself what is the real advantage of having PDX serialization ? thanks, Siby. -- Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/
Re: Queries on key fields
Usually key fields are faster -- Mike Stolz Principal Engineer, GemFire Product Lead Mobile: +1-631-835-4771 On Fri, Sep 28, 2018 at 2:49 PM siby_sekar wrote: > Which is more performant running queries on key fields or non key fields? > > we have an object in the form > > sessionid : { Listmessages} > > and message can be like { > > id1, > > sessionid, > > name > > } > > etc. > > > > > > -- > Sent from: > http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/ >
Queries on key fields
Which is more performant running queries on key fields or non key fields? we have an object in the form sessionid : { Listmessages} and message can be like { id1, sessionid, name } etc. -- Sent from: http://apache-geode-incubating-developers-forum.70738.x6.nabble.com/