# Load more than 1 million row from SQL Server to ES with Logstash

**URL:** <https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash/273627>\
**Category:** Elasticsearch\
**Created:** [May 21, 2021, 7:37am UTC](https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash/273627 "2021-05-21T07:37:22Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dai\_Thai\_Hoa\_Vo](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dai_thai_hoa_vo/32/78486_2.png) [@Dai\_Thai\_Hoa\_Vo](https://discuss.elastic.co/u/Dai_Thai_Hoa_Vo)\
**Post date:** [May 21, 2021, 7:37am UTC](https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash/273627/1 "2021-05-21T07:37:22Z")

</div>

Hi every one.  
I have one case that my table has more 1 million rows in SQL Server and I used logstash JDBC to load them to Elastic Search. It work fine but run very slow.  
This is my file config.

```
input {
jdbc {
jdbc_driver_library => "C:\ELK\elasticsearch-7.12.0-windows-x86_64\elasticsearch-7.12.0\lib\sqljdbc_9.2\enu\mssql-jdbc-9.2.1.jre8.jar"
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_connection_string =>"jdbc:sqlserver://BPHHP13:1433;databaseName=WRIPMS;"
jdbc_user => "test"
jdbc_password => "TuanTu2017@)!&"
jdbc_paging_enabled => true
clean_run => true
schedule => "*/5 * * * * *"
statement => "select [countyId], [countyName], [modifiedDate] from Counties where [modifiedDate] > :sql_last_value"
use_column_value => true
tracking_column => "modifiedDate"
lowercase_column_names => false
}
}
output {
elasticsearch{
hosts => "http://localhost:9200/"
index => "counties_index"
action => "update"
doc_as_upsert => true
document_id => "%{countyId}"
}
stdout {
codec => rubydebug
}
}

```

Please any one help me.  
Thank you.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 21, 2021, 7:48am UTC](https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash/273627/2 "2021-05-21T07:48:26Z")

</div>

Hey

You already opened the same question at [Load more than 1 million row from SQL Server to ES with Logstash JDBC](https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash-jdbc/273563)

Let's keep the discussion in one single place. Thanks!

---

<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:** [June 18, 2021, 7:48am UTC](https://discuss.elastic.co/t/load-more-than-1-million-row-from-sql-server-to-es-with-logstash/273627/3 "2021-06-18T07:48:30Z")

</div>

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