0

Can someone help me on group by multiple columns in crate?

For ex.

SELECT COUNT(1), x, y from table GROUP BY x,y

Thanks in Advance.

Cœur
  • 37,241
  • 25
  • 195
  • 267
Carbonrock
  • 457
  • 2
  • 15
  • the resultset can exceed 25000 records. Error! SQLActionException[CircuitBreakingException: [query] Data too large, data for [collect: 0] would be larger than limit of [622775500/593.9mb]] – Carbonrock Jan 10 '17 at 15:50
  • Please help me which parameter I need to increase. Where is this default configuration exists. My Heap size is already 16G. CRATE_MIN_MEM=256m CRATE_MAX_MEM=1g CRATE_HEAP_SIZE=16g – Carbonrock Jan 10 '17 at 15:53

1 Answers1

2

Your grouping statement seems good (you should use count(*) though, CrateDB opimizes for that specifically, count(1) will be slower), but the CircuitBreakerException and the low amount of memory stated there indicates a memory misconfiguration.

Can you set

CRATE_MIN_MEM=16g
CRATE_MAX_MEM=16g
CRATE_HEAP_SIZE=16g

What operating system are you working on? CRATE_HEAP_SIZE should automatically set CRATE_MIN_MEM and CRATE_MAX_MEM, but there might be a problem with precedence...

Cheers, Claus

claus
  • 377
  • 2
  • 9