# Jdbc\_static performance issues

**URL:** <https://discuss.elastic.co/t/jdbc-static-performance-issues/163364>\
**Category:** Logstash\
**Created:** [January 8, 2019, 12:41pm UTC](https://discuss.elastic.co/t/jdbc-static-performance-issues/163364 "2019-01-08T12:41:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![darefilz](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@darefilz](https://discuss.elastic.co/u/darefilz)\
**Post date:** [January 8, 2019, 12:41pm UTC](https://discuss.elastic.co/t/jdbc-static-performance-issues/163364/1 "2019-01-08T12:41:29Z")

</div>

Hello there,

I am comparing Jdbc\_static performance to Jdbc\_streaming performance. I expected to see that Jdbc\_static is slower for the first few event but scales better the more events use that filter. Oddly Jdbc\_streaming is faster no matter the number of events.  
Of course the database server the plugins connect to has faster hardware than my local computer, but the difference is not that big.  
Any ideas where to look at?

The local JVM heap size is set to 2g which should be enough for the 500 records I am talking about.

Here is the jdbc\_static config:

```auto
filter {
  jdbc_static {
    jdbc_driver_library => "mssql-jdbc-7.0.0.jre8.jar"
    jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
    jdbc_connection_string => "jdbc:sqlserver://…"
    loaders => [{
      query => "select ID, NAME from TABLE"
      local_table => "TEST"
    }]
    local_db_objects => [{
      name => "TEST"
      index_columns => ["ID"]
      columns => [
        ["ID", "numeric(12)"],
        ["NAME", "varchar(255)"]
      ]
    }]
    local_lookups => [{
      query => "select ID, NAME from TABLE where ID = :id"
      parameters => { "id" => "[id]" }
      target => "[@metadata][foo]"
    }]
  }
}

```

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 5, 2019, 12:41pm UTC](https://discuss.elastic.co/t/jdbc-static-performance-issues/163364/2 "2019-02-05T12:41:31Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
