You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Prasad Bhalerao <pr...@gmail.com> on 2018/11/13 13:25:41 UTC

Re: Query execution too long even after providing index

Hi Evgenii,

Thank you for suggesting the query optimization. It worked perfectly fine.
I unnecessarily complicated the sql.
I really appreciate the efforts you guys are taking to help out the users.

About the test data: Yes in production I will be having more than 100K
records for single subscription and moduleId.
The test data generated has 5 million entries against subscriptionId and
moduleId. This is a worst case scenario but we do have such cases in
production.

Thanks,
Prasad

On Mon, Oct 22, 2018 at 6:22 PM Evgenii Zhuravlev <e....@gmail.com>
wrote:

> Well, looks like you trying to find the segments that intersects defined
> segment, but you're complicating it. You don't need 3 conditions here - it
> will be enough to have only one - ipStart <= MAX and ipEnd >= MIN. I've
> checked it for your case and got absolutely the same results as you have
> with a too complex query.
>
> Aditionally, you have the same subscriptionId AND moduleId  in your test
> data, which means that you will have a bad selectivity when you will filter
> by these fields at first. Do you really have such data in your production?
>
> Also, when you will measure something again - do operation a lot of times
> - that how benchmarks work. Ignite initialize internal structures at first
> executions, so, it will not give an idea of overall latency if you will
> measure it just once.
>
> Best Regards,
> Evgenii
>
> пн, 22 окт. 2018 г. в 6:56, Prasad Bhalerao <prasadbhalerao1983@gmail.com
> >:
>
>> Hi Evgenii,
>>
>> Did you get time to check the reproducer?
>>
>> Can you please suggest solution for this?
>>
>>
>> Thanks,
>> Prasad
>>
>>
>> On Fri, Oct 19, 2018, 4:46 PM Prasad Bhalerao <
>> prasadbhalerao1983@gmail.com> wrote:
>>
>>> Hi Evgenii,
>>>
>>> I have created a reproducer and uploaded it to GitHub. I have created 5
>>> cases to test the sql execution time.
>>>
>>> GitHub project: https://github.com/prasadbhalerao1983/IgniteTestPrj.git
>>>
>>> Please run IgniteQueryTester class.
>>>
>>> Thanks,
>>> Prasad
>>>
>>> On Wed, Oct 17, 2018 at 7:46 PM ezhuravlev <e....@gmail.com>
>>> wrote:
>>>
>>>> How much data do you have?  What is the amount of heap and offheap
>>>> memory?
>>>> Can you share the reproducer with the community?
>>>>
>>>> Evgenii
>>>>
>>>>
>>>>
>>>> --
>>>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>>>
>>>