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

Show the total number of nodes and relationships in db meta sidebar #781

Merged
merged 1 commit into from
Jun 12, 2018

Conversation

oskarhane
Copy link
Member

@oskarhane oskarhane commented Jun 5, 2018

Count the number of nodes and relationships on every db-meta update.

Display like we do in the viz legend.

oskarhane-mbpt 2018-06-04 at 15 08 03

Count the number of nodes and relationships on every db-meta update
@jexp
Copy link
Member

jexp commented Jun 5, 2018

Cool! Can we do that for all the labels + rel-types?
Either with: match (n:Label) return count(*) queries that should all execute in single ms.
Or with a trick in one query:

MATCH (:Label1) RETURN {label:'Label1', count:count(*)} as info
UNION ALL
MATCH (:Label2) RETURN {label:'Label2', count:count(*)} as info
UNION ALL
MATCH ()-[:TYPE1]->() RETURN {type:'TYPE1', count:count(*)} as info

Started streaming 3 records in less than 1 ms and completed after 1 ms.

╒════════════════════════════╕
│"info"                      │
╞════════════════════════════╡
│{"label":"Label1","count":0}│
├────────────────────────────┤
│{"label":"Label2","count":0}│
├────────────────────────────┤
│{"type":"TYPE1","count":0}  │
└────────────────────────────┘

@pe4cey
Copy link
Contributor

pe4cey commented Jun 12, 2018

LGTM

@pe4cey pe4cey merged commit daa821f into neo4j:master Jun 12, 2018
@oskarhane oskarhane changed the title Show number of nodes and relationships in db sidebar Show the total number of nodes and relationships in db meta sidebar Jun 13, 2018
@oskarhane oskarhane deleted the sidebar-counts branch October 23, 2018 15:05
myzero1 pushed a commit to myzero1/neo4j-browser that referenced this pull request May 17, 2019
Show number of nodes and relationships in db sidebar
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants