Both should work, but the 1st one does not require creation of a temporary
table, so prefer the 1st one.

On Mon, May 16, 2016 at 1:12 PM, diopek <deha.pe...@gmail.com> wrote:

> Can you please advise, which SQL group-by query would be better practice,
> perform better?
>
> (1)
> *select A, B, SUM(C) from MyCache where
> MyCache.id IN (....................)
> group by A, B*
>
> or,
> (2)
> by first storing IDs to be joined into some temporary cache as setting ID
> as
> affinity key to co-locate the data with MyCache
>
> and then do a cross-cache join query as the following;
>
> *select A, B, SUM(C) from MyCache, TempCache where
> MyCache.id = TempCache.id
> group by A, B*
>
> (1) or (2) ?
>
>
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite-Aggregation-query-tp4968p4974.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to