Hi,

I am new to Geode and trying to implement for an use case to get an
aggregation of the data from two regions.

One region has the data received from the source system one and updated on
daily basis and has around 2.7 million records and based on market. I am
planning to setup this region as partitioned based on market data in two
servers.

One region has the data received from the source system two and has around
1 million records and it is also partitioned based on market data.

The requirement is to get aggregate joining both the regions with a key
common to both and provide a where clause

Region1 Attributes

productId
marketId
price
quantity

Region2 Attributes

productId
marketId
eventId

select sum(r.price.multiply(r.quantity)) from Region1 r1, Region2 r2
where r1.productId = r2.productId and r2.eventId = '123'

Currently trying to run the above query as the server function just
ingesting 50K records for both the region though it is taking huge time and
can see spike in the CPU usage. Already using PDX serialization for this
and tried creating index for productId in both the regions

Any suggestion to improve the performance of this query. Also please advice
if we need to use joins for this or we need to fetch region2 records based
on eventId and do a lookup for region1 do the aggregation in server
function.

Thanks!
Mags

Reply via email to