Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPP: Result Set size #18667

Open
kshxtij opened this issue Feb 4, 2025 · 5 comments
Open

CPP: Result Set size #18667

kshxtij opened this issue Feb 4, 2025 · 5 comments
Labels
question Further information is requested

Comments

@kshxtij
Copy link

kshxtij commented Feb 4, 2025

I'm currently running a expensive custom query to recover the callgraph of a large c codebase.

However, it errors out with Failed: Result set is larger than the limit of 2GiB.

What is this limit and is that something I can modify?

@kshxtij kshxtij added the question Further information is requested label Feb 4, 2025
@redsun82
Copy link
Contributor

redsun82 commented Feb 4, 2025

Unfortunately that limit is a hard one and is not configurable. After looking it up, it seems like the unit used in the log is actually misplaced: it's not that the result set is occupying more than 2GiB of memory or storate, it's that the total number of results is exceeding MAX_ARRAY_SIZE, which is MAX_INTEGER_SIZE/2 == 2147483648, or 2 * 1024^3. Maybe working on restricting the query could help toning the result set down?

@kshxtij
Copy link
Author

kshxtij commented Feb 4, 2025

Right, that makes sense.

Im working with a path-problem query to rebuild the call graph and the result set for that is massive since I'm working with the linux kernel src. I'll look into restricting my query more or try to build the call graph more iteratively.

@redsun82
Copy link
Contributor

redsun82 commented Feb 5, 2025

For the linux kernel you may also have some luck with disabling options in your defconfig for parts of the code you're not interested in, to decrease the size of the database you're working with.

@intrigus-lgtm
Copy link
Contributor

@redsun82 would be interesting to see whether it's possible to port the result set to panama/ffi/off-heap arrays to use bigger arrays.
If the result set is essentially just primitive values/strings that should be doable. Would make for a fun project :)

@redsun82
Copy link
Contributor

redsun82 commented Feb 6, 2025

@intrigus-lgtm interesting suggestion! I'll circulate it 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants