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

Is there any API to dump the size of a relation rather than the whole content? #1172

Open
enochii opened this issue Sep 7, 2023 · 3 comments

Comments

@enochii
Copy link

enochii commented Sep 7, 2023

Hi, really excellent work!

I wonder if there is any API to dump the size of a relation rather than the whole content, say, at the end of a transaction? It seems like there is no such API according to the command reference.

@mihaibudiu
Copy link

One way this can be done is by creating (ahead of time) a relation (view) that maintains the size of another relation (using aggregation) and querying that one.

Please note that this project is now archived. There is a follow-up project at https://github.com/feldera/feldera

@ryzhyk
Copy link
Contributor

ryzhyk commented Sep 7, 2023

An aggregate view may not be a good solution, esp. for production use due to the overhead. I would recommend using the profile command, which will output the size of all in-memory indexes maintained by the program. It's too expensive to call on every transaction, but you can call it once in a while.

@enochii
Copy link
Author

enochii commented Sep 8, 2023

Thanks a lot for the kind reply!

I am not so familiar with Datalog. Just curious, I wonder why no such API provided, it seems quite natural from my perspective since we already have APIs to dump the content of relations. Is it due to performance issue?

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

No branches or pull requests

3 participants