-
Notifications
You must be signed in to change notification settings - Fork 132
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
Kogito - Data Index Support to Query Count #1506
Comments
Hello @debu999, we have been avoiding this total count queries regarding performance reasons. I guess you can always execute a custom query to get that information from graphql endpoint, as I think you are already doing. Feel free to open a jira with the details about what you really need form data-index in order to discuss this feature request. |
Hi @nmirasch was there any discussion on this ask. |
@debu999 this is an interesting topic, and there are many ways to solve this problem. Based on our experience with different implementations, including jBPM, we found that the cost of adding a query for the count in every request is not worth it and usually slows down the response times unnecessarily. Basically, we need to do ( generate based on filters ), a count query that gets executed along with the actual filter. This can get complex quite quickly and, as mentioned, slow things down, but more importantly, this count does not give any guarantee to the end user about how many items he might have to go through. The count result can be outdated as soon as it is displayed to the user, so this really makes us question this approach. For our UI tools, we now use a |
Hi @cristianonicolai , I do understand having count called separately per call might be ineffective but having a separate option to get count for filter might help. For example if at query time if total count is 30000 we do have subscription to update/create process instances so we can update the count real time. |
@debu999 ok, so if I understood correctly, you want to be able to execute an aggregator for a specific query, and that would be a separate call to Data Index? That would need to be a separate query, something like |
Yes it's correct |
I feel it will make sense just to add a few aggregation on columns of a filter as all persistence store does provide that out of the box. All we need is to map a give aggregation for a given data type. This can be possibly count/sum to start with. |
@debu999 yep, that sounds reasonable |
can there be a simple update to graphql just to return the native db query as a endpoint. |
We use data index with mongodb. If we get the db query we will be able to update it for count calls separately. |
does it have a jira to start with. |
@cristianonicolai is there any option just to expose the filter query so we can modify as need to get the count or other aggregations on top of filter criteria. viz. ABCDomainQuery |
@cristianonicolai @nmirasch Is there any tracktion on this request. We are looking for some thing to ensure our apps are providing consistent results. |
@pefernan @ricardozanini @nmirasch Please advise |
@nmirasch |
Hello @prerana15 @debu999, sorry for the big delay answering, |
At present data Index only suppports paginated queries and total data based on filters.
The system have to keep hitting the api but is never sure on how many times to make paginated calls.
Can we have a option to return total count for a given filter. This will make the applications depend on it to support more data pull.
At present we have written custom calls to the domain cache and have own logic to parse the filter. It will be very good if we can have count for a given filter returned by DI queries itself.
@nmirasch Please advise on this.
The text was updated successfully, but these errors were encountered: