-
Notifications
You must be signed in to change notification settings - Fork 112
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
Ability to run queries in batch size Postgres #134
Comments
Hi @rezonick , my open PR #132 kind of does what you're asking. It allows you to retrieve a list of values using a certain query and then iterate over those values executing a query for each one. In your case you could retrieve your list of databases through the iterator query and then run it for each database separately. |
Hi @marevers, Thank you for your help. Just to clarify, I am currently able to query all the databases using the
However, this approach fires all the queries simultaneously for all open connections towards the tenant_* databases. From what I understand, using the iterate feature mentioned in the following PR #132, the queries will be executed one by one. Is that correct? |
Correct. Instead of using the include feature you would pick for instance the In your case you could call it
The exporter will then generate an individual query for each database, replacing the |
The feature presented in PR #132 works, and we were able to use it. |
Hi,
We use the following
database
discovery support for Postgres (#124).We have many databases and some queries, and executing them simultaneously for all the defined databases causes a high CPU load on our cluster, and impacts performance and QoS.
Currently, we're working on optimizing these queries.
can we limit the exporter to not run all the queries simultaneously, but in some batch sizes?
e.g:
We have many databases
tenant_*
and we don't want to query all of these at once.The text was updated successfully, but these errors were encountered: