# Sql\_last\_value, store value even no document indexed

**URL:** <https://discuss.elastic.co/t/sql-last-value-store-value-even-no-document-indexed/213695>\
**Category:** Logstash\
**Created:** [January 3, 2020, 11:53am UTC](https://discuss.elastic.co/t/sql-last-value-store-value-even-no-document-indexed/213695 "2020-01-03T11:53:06Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![pilo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pilo/32/46015_2.png) [@pilo](https://discuss.elastic.co/u/pilo)\
**Post date:** [January 7, 2020, 1:40pm UTC](https://discuss.elastic.co/t/sql-last-value-store-value-even-no-document-indexed/213695/5 "2020-01-07T13:40:18Z")

</div>

Hello, thank you for your reply.  
In fact i raised java heap size to 3g and can't go further.  
Otherwise, after doing some search, i found this:

> [@Logstash jdbc input plugin pagination not working on version 7.4.2](https://discuss.elastic.co/t/logstash-jdbc-input-plugin-pagination-not-working-on-version-7-4-2/211783):
>
> Using jdbc input plugin, pagination is not working on version 7.4.2. Using version 7.0.0 it works fine. Any ideas what's missing? Logstash config: input { jdbc { jdbc\_driver\_library =\> "${LOGSTASH\_LIB\_DIR}/mysql-connector-java.jar" jdbc\_driver\_class =\> "com.mysql.jdbc.Driver" jdbc\_connection\_string =\> "jdbc:${DATABASE\_URL}?sessionVariables=group\_concat\_max\_len=1000000" jdbc\_user =\> "${DATABASE\_USER}" jdbc\_password =\> "${DATABASE\_PASSWORD}" statement\_filepath =\> "${LO…

It's so weird that no one talk about this. I tried version 7.0.0 and it works.  
Which version did you use ?  
This is my config:

```auto
input {
    jdbc {
        jdbc_connection_string => "jdbc:postgresql://${POSTGRES_HOST}:${POSTGRES_PORT}/${DB_NAME}"
        jdbc_driver_class => "org.postgresql.Driver"

        jdbc_user => "${JDBC_USER}"
        jdbc_password => "${JDBC_PASSWORD}"

        jdbc_paging_enabled => true
        jdbc_page_size => 10000

        statement_filepath=> "/usr/share/logstash/config/indexing_sql/decision_indexing.sql"

        type => "decision"
    }
}

filter {
    mutate {
        add_field => {
            "[my_join_field][name]" => "decision"
            "[my_join_field][parent]" => "%{case_id}"
        }
    }
}

output {
    elasticsearch {
    	hosts => "elasticsearch:9200"
		user => "elastic"
		password => "changeme"
        index => "case"
        routing => "%{case_id}"
    }
}

```

Do you have any idea what's missing ?

---

_[View the full topic](https://discuss.elastic.co/t/sql-last-value-store-value-even-no-document-indexed/213695)._
