– title: Configuring EDB Query Advisor navTitle: Configuring —
To run EDB Query Advisor, you need to add it to
shared_preload_libraries and create the extension in the database.
In the
postgresql.conffile, addquery_advisorto theshared_preload_librariesparameter:
shared_preload_libraries = query_advisor
Note
If shared_preload_libraries has other extensions, then you can add query_advisor to the list. The order doesn’t matter. !!!
Restart Postgres.
Create the EDB Query Advisor extension in your database:
CREATE EXTENSION query_advisor;
Parameters¶
The following custom GUCs control the EDB Query Advisor extension behavior.
If you modify these parameters, then reload Postgres to apply the changes:
query_advisor.enabled— Specifies whether to enable query_advisor. It takes a Boolean value. The default istrue.query_advisor.sample_rate— Sets the fraction of queries to sample. It takes a double value. For example, 0.1 indicates to sample only 1 out of 10 queries. The default is -1, which specifies automatic and results in a value of 1 / max_connections.
If you modify these parameters, then restart Postgres to apply the changes:
query_advisor.max_qual_entries— Sets the maximum number of predicates tracked. The default is 100000.query_advisor.max_workload_entries— Sets the maximum number of workload queries tracked. The default is 100000.query_advisor.max_workload_query_size— Sets the maximum size of the workload query. The default is 1024 bytes.