Skip to content

Clever tool for pointing out potential issues between java application and database.​

License

Notifications You must be signed in to change notification settings

EmbedITCZ/dbadvisor

Repository files navigation

DBadvisor

Maven Central Build Status Codacy Badge

Clever tool for pointing out potential issues between java application and database.

It helps automatically detect:

  • full access in execution plan
  • expensive execution plans
  • missing index for foreign key
  • slow queries
  • N+1 issue

Usage

Dependencies

  • java 8
  • spring framework
  • datasource-proxy

Integration to java project

At first we have to depend on maven artifact:

<dependency>
    <groupId>com.github.embeditcz.dbadvisor</groupId>
    <artifactId>dbadvisor</artifactId>
</dependency>

At second point we have to enable DBadvisor in spring configuration:

@Configuration
@EnableDbAdvisor
public class MyAppConfiguration {
    
}

Configuration

Configuration for DBadvisor is provided by environment. The list of all environment variables:

Property name Default value
dbadvisor.nplus1.enabled true
dbadvisor.nplus1.threshold 10
dbadvisor.oracle.cost-base.enabled true
dbadvisor.oracle.cost-base.threshold 100
dbadvisor.oracle.cpu-cost.enabled true
dbadvisor.oracle.cpu-cost.threshold 100000
dbadvisor.oracle.execution-plan.enabled true
dbadvisor.oracle.execution-plan.ignore-batch false
dbadvisor.oracle.full-access.enabled true
dbadvisor.oracle.full-access.threshold 1
dbadvisor.oracle.io-cost.enabled true
dbadvisor.oracle.io-cost.threshold 1000
dbadvisor.oracle.foreign-key.enabled true
dbadvisor.oracle.foreign-key.threshold 1
dbadvisor.slow-query.enabled true
dbadvisor.slow-query.ignore-batch false
dbadvisor.slow-query.threshold 1000
dbadvisor.report.name dbadvisor
dbadvisor.report.location temporary folder, see java.io.tmpdir system property
dbadvisor.report.on-shutdown-hook true
dbadvisor.max-issues-count-per-type 100

About

Clever tool for pointing out potential issues between java application and database.​

Resources

License

Stars

Watchers

Forks

Packages

No packages published