You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geode.apache.org by Amit Pandey <am...@gmail.com> on 2017/07/04 14:38:01 UTC

Querying 30K data from geode region

Hey Guys.

I am querying some 30K data from a region. Its aPOJO with around 20 fields,
using PDX.

It takes around 20 seconds for this. is there any other way to optimize
this?

Regards

Re: Querying 30K data from geode region

Posted by Jason Huynh <jh...@pivotal.io>.
Adding to what Swapnil suggested, assuming you are only interested in a few
of the fields and not the entire object, try adding a projection field to
the query.  This might improve performance as less data would need to be
serialized to a client.

I'd definitely try adding an index (some queries will not take advantage of
the index- such as "select * from /region r" - there is nothing to filter
out)

On Wed, Jul 5, 2017 at 11:03 AM Swapnil Bawaskar <sb...@pivotal.io>
wrote:

> You can look into adding an index
> <http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html>.
> What is the query?
>
> On Tue, Jul 4, 2017 at 7:44 AM Amit Pandey <am...@gmail.com>
> wrote:
>
>> Hey Guys.
>>
>> I am querying some 30K data from a region. Its aPOJO with around 20
>> fields, using PDX.
>>
>> It takes around 20 seconds for this. is there any other way to optimize
>> this?
>>
>> Regards
>>
>

Re: Querying 30K data from geode region

Posted by Jason Huynh <jh...@pivotal.io>.
Cool, creating an index will definitely help here.  create an index on
userID

On Wed, Jul 5, 2017 at 11:13 AM Amit Pandey <am...@gmail.com>
wrote:

> Yes Projection is a good idea.
>
> On Wed, Jul 5, 2017 at 11:42 PM, Amit Pandey <am...@gmail.com>
> wrote:
>
>> Its pretty simple like :-
>>
>> select * from /orders  where userID=1;
>>
>> I know the syntax is not correct.
>>
>> So you are saying to add some index or userID
>>
>> On Wed, Jul 5, 2017 at 11:33 PM, Swapnil Bawaskar <sb...@pivotal.io>
>> wrote:
>>
>>> You can look into adding an index
>>> <http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html>.
>>> What is the query?
>>>
>>> On Tue, Jul 4, 2017 at 7:44 AM Amit Pandey <am...@gmail.com>
>>> wrote:
>>>
>>>> Hey Guys.
>>>>
>>>> I am querying some 30K data from a region. Its aPOJO with around 20
>>>> fields, using PDX.
>>>>
>>>> It takes around 20 seconds for this. is there any other way to optimize
>>>> this?
>>>>
>>>> Regards
>>>>
>>>
>>
>

Re: Querying 30K data from geode region

Posted by Amit Pandey <am...@gmail.com>.
Yes Projection is a good idea.

On Wed, Jul 5, 2017 at 11:42 PM, Amit Pandey <am...@gmail.com>
wrote:

> Its pretty simple like :-
>
> select * from /orders  where userID=1;
>
> I know the syntax is not correct.
>
> So you are saying to add some index or userID
>
> On Wed, Jul 5, 2017 at 11:33 PM, Swapnil Bawaskar <sb...@pivotal.io>
> wrote:
>
>> You can look into adding an index
>> <http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html>.
>> What is the query?
>>
>> On Tue, Jul 4, 2017 at 7:44 AM Amit Pandey <am...@gmail.com>
>> wrote:
>>
>>> Hey Guys.
>>>
>>> I am querying some 30K data from a region. Its aPOJO with around 20
>>> fields, using PDX.
>>>
>>> It takes around 20 seconds for this. is there any other way to optimize
>>> this?
>>>
>>> Regards
>>>
>>
>

Re: Querying 30K data from geode region

Posted by Amit Pandey <am...@gmail.com>.
Its pretty simple like :-

select * from /orders  where userID=1;

I know the syntax is not correct.

So you are saying to add some index or userID

On Wed, Jul 5, 2017 at 11:33 PM, Swapnil Bawaskar <sb...@pivotal.io>
wrote:

> You can look into adding an index
> <http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html>.
> What is the query?
>
> On Tue, Jul 4, 2017 at 7:44 AM Amit Pandey <am...@gmail.com>
> wrote:
>
>> Hey Guys.
>>
>> I am querying some 30K data from a region. Its aPOJO with around 20
>> fields, using PDX.
>>
>> It takes around 20 seconds for this. is there any other way to optimize
>> this?
>>
>> Regards
>>
>

Re: Querying 30K data from geode region

Posted by Swapnil Bawaskar <sb...@pivotal.io>.
You can look into adding an index
<http://geode.apache.org/docs/guide/11/developing/query_index/query_index.html>.
What is the query?

On Tue, Jul 4, 2017 at 7:44 AM Amit Pandey <am...@gmail.com>
wrote:

> Hey Guys.
>
> I am querying some 30K data from a region. Its aPOJO with around 20
> fields, using PDX.
>
> It takes around 20 seconds for this. is there any other way to optimize
> this?
>
> Regards
>