ksql icon indicating copy to clipboard operation
ksql copied to clipboard

How to restrain memory use of insert into queries

Open ChenZhaobin opened this issue 3 years ago • 3 comments

Everytime when I add an insert into query ,the memory will be incremented by 0.08GB,even if there is no data coming throught the stream, I need 20000 insert into queries in my case ,so do you guys have better idea? please help me

ChenZhaobin avatar Jun 16 '21 11:06 ChenZhaobin

Hey @ChenZhaobin can you clarify what you mean by "20000 insert into queries"? Are you trying to running 20k concurrent INSERT INTO ... statements, are there 20k events going through a single INSERT INTO or are you inserting 20K events via INSERT INTO ... VALUES statements?

It would be good to get a sense of your use case so we can help you dig into this.

agavra avatar Jun 28 '21 20:06 agavra

Hey @agavra , running 20k concurrent INSERT INTO ... statements ,this is what I mean. I followed this post: https://www.confluent.io/blog/bounding-ksqldb-memory-usage/ , but it still is not possible to create 20k concurrent INSERT INTO ... statements . In my case ,I need to create different streams (or create multiple insert into statements into a same stream ) based on different duration. such ascreate stream ....within Duration, and Duration is a variable, if we set Duration 20k times ,then we will need 20k concurrent INSERT INTO ...` statements

ChenZhaobin avatar Jun 30 '21 01:06 ChenZhaobin

Hi @ChenZhaobin did you figure out your problem? I dont have anywhere near 20k, but unsure how to limit memory - that link does not seem to be fixing our problem either

nigulable avatar Oct 25 '21 12:10 nigulable