The collocated flag is an extra optimization hint for SQL queries with
GROUP BYs. The parameter requests to group records locally on the nodes
that participated in the query execution. For instance, if your application
sends a query with GROUP BY to a couple of server nodes, then the nodes
will group their portions of the result sets locally not making that the
burden of the application that merges/reduces the result sets into one. The
description of this parameter here should be helpful as well:
https://apacheignite-sql.readme.io/docs/jdbc-driver#parameters

<https://apacheignite-sql.readme.io/docs/jdbc-driver#parameters>
>
> Should I assume that if the table is defined with affinity set, then
> compute collocation, including sql execution will happen automatically?


That's right. You just need to set up the affinity keys and Ignite will
take care of the rest. Btw, you might be interested in this SQL webinar we
delivered recently. The webinar explains our SQL capabilities in detail:
https://www.youtube.com/watch?v=eYV-tNLzIts

-
Denis


On Wed, Jun 17, 2020 at 11:28 AM narges saleh <snarges...@gmail.com> wrote:

> Then can you please explain what the option collocated=true for JDBC url
> is for?
> Should I assume that if the table is defined with affinity set, then
> compute collocation, including sql execution will happen automatically?
> I am sorry if this is just a basic question.
>
> On Wed, Jun 17, 2020 at 12:57 PM Denis Magda <dma...@apache.org> wrote:
>
>> If the data is already co-located you don't need to pass in any other
>> parameters.
>>
>> -
>> Denis
>>
>>
>> On Wed, Jun 17, 2020 at 10:13 AM narges saleh <snarges...@gmail.com>
>> wrote:
>>
>>> Hi Denis. The tables are defined with affinity keys specified. What I am
>>> asking whether to set the collection option when I insert or query the data
>>> via SQL line.
>>>
>>> thanks
>>>
>>> On Wed, Jun 17, 2020 at 11:39 AM Denis Magda <dma...@apache.org> wrote:
>>>
>>>> Hi,
>>>>
>>>> You need to pass the required parameters to the JDBC driver's
>>>> connection URL:
>>>> https://apacheignite-sql.readme.io/docs/jdbc-driver#parameters
>>>>
>>>> However, I'm not quite sure what you mean under the "collocation" in
>>>> the following context. All your data needs to be co-located beforehand
>>>> (ensure you have affinity keys configured) and then just send your queries
>>>> with joins with no additional connection parameters.
>>>>
>>>> -
>>>> Denis
>>>>
>>>>
>>>> On Wed, Jun 17, 2020 at 9:33 AM narges saleh <snarges...@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi All,
>>>>>
>>>>> Is collocation enforced when SQL is issues in sqline command line or
>>>>> do I need to give the option when I start sqlline?
>>>>>
>>>>> thanks.
>>>>>
>>>>

Reply via email to