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

Query statistics #263

Closed
doublex opened this issue Feb 26, 2023 · 8 comments
Closed

Query statistics #263

doublex opened this issue Feb 26, 2023 · 8 comments

Comments

@doublex
Copy link

doublex commented Feb 26, 2023

Is there a button to query nebula-python if a query was exhausting?
Nebula is never slow - but I have the impression some queries are CPU expensive.
I would like to pinpoint those.

@wey-gu
Copy link
Contributor

wey-gu commented Feb 27, 2023

Is there a button to query nebula-python if a query was exhausting? Nebula is never slow - but I have the impression some queries are CPU expensive. I would like to pinpoint those.

Would you mind describing more on your picture of this feature? Better with some reference that other lib provided similar functions?

@doublex
Copy link
Author

doublex commented Feb 27, 2023

Yes, sorry.
Some query is causing a lot of CPU load on the Nebula server.
Is there a profiler tool to find out which query it is?
My first thought was a summary-feature like:

result = session.execute( statement )
slow_query = result.get_stats()

@wey-gu
Copy link
Contributor

wey-gu commented Feb 28, 2023

You could go with SHOW QUERIES, for now, we could only see like how long they were executed.

But normally long run queries are those we need to care about, right?

@doublex
Copy link
Author

doublex commented Mar 2, 2023

@wey-gu
Thanks for everything!!

@doublex doublex closed this as completed Mar 2, 2023
@wey-gu
Copy link
Contributor

wey-gu commented Mar 2, 2023

np, @doublex will SHOW QUERIES and KILL QUERY help?

@doublex
Copy link
Author

doublex commented Mar 2, 2023

You put me on the right track:
https://docs.nebula-graph.io/3.4.0/3.ngql-guide/17.query-tuning-statements/1.explain-and-profile/
Best wishes!

@wey-gu
Copy link
Contributor

wey-gu commented Mar 2, 2023

Wow good to know it helped in some way.

Then I would recommend my blog post about this: https://www.siwei.io/ngql-execution-plan/ while it's Chinese only for now, if you can't read Chinese, I'll post the English version soon.(sorry about this)

@doublex
Copy link
Author

doublex commented Mar 2, 2023

@wey-gu
Impressive! Thanks for everything!

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

2 participants