-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
area/performancePerformance related issues.Performance related issues.area/querylangIssues related to the query language specification and implementation.Issues related to the query language specification and implementation.status/more-info-neededThe issue has been sent back to the reporter asking for clarificationsThe issue has been sent back to the reporter asking for clarifications
Description
Experience Report
What you wanted to do
I want to know how many uids have a specific predicate.
What you actually did
The query
{
result (func: has(pred)) {
count(uid)
}
}
gives me the number of uids that have predicate pred.
Why that wasn't great, with examples
This query is very slow for large predicates. There must be some index or cardinality information for a predicate available to answer this query in constant time. The "Schema" tab in Ratel provides for predicates the "Samples & Statistics" tab, which seems to fire the same query, which takes for ever. Improving this query would also improve UX for Ratel:

Metadata
Metadata
Assignees
Labels
area/performancePerformance related issues.Performance related issues.area/querylangIssues related to the query language specification and implementation.Issues related to the query language specification and implementation.status/more-info-neededThe issue has been sent back to the reporter asking for clarificationsThe issue has been sent back to the reporter asking for clarifications