Skip to content
Discussion options

You must be logged in to vote

GOMEMLIMIT only applies to memory allocated in Go and managed by the Go garbage collector.

DuckDB has its own memory_limit setting which it will use as a soft limit to decide when to spill intermediate query results to disk.

For query results, the memory is going to stay on the DuckDB / C++ side until it’s read by a rows.Scan(&val) call in your app. At that point duckdb-go reads the duckdb data chunk memory directly and writes the converted value into the val variable you passed in. I’m not 100% sure if the data chunk on the DuckDB side is deallocated as results are read or only once rows.Close() is called, but that’s a pretty fine grained detail that you don’t need to care about in most …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by TheEdgeOfRage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants