# How to import millions of rows from Postgres to elastic

**URL:** <https://discuss.elastic.co/t/how-to-import-millions-of-rows-from-postgres-to-elastic/185332>\
**Category:** Logstash\
**Created:** [June 12, 2019, 6:22am UTC](https://discuss.elastic.co/t/how-to-import-millions-of-rows-from-postgres-to-elastic/185332 "2019-06-12T06:22:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sayed\_Atif](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sayed_atif/32/46687_2.png) [@Sayed\_Atif](https://discuss.elastic.co/u/Sayed_Atif)\
**Post date:** [June 12, 2019, 6:22am UTC](https://discuss.elastic.co/t/how-to-import-millions-of-rows-from-postgres-to-elastic/185332/1 "2019-06-12T06:22:03Z")

</div>

Hello guys, I am trying to import millions of rows from Postgres to elastic using Logstash and jdbc-input-plugin. But I have to pull data from 15+ tables so join query is not a good solution as it takes too long to process. I have tried using jdbc\_streaming and splitting my join query to multiple stream block but no success. Any idea of how can I import rows performative? Any suggestion would be helpful.

Thanks in advance

---

<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:** [July 10, 2019, 6:22am UTC](https://discuss.elastic.co/t/how-to-import-millions-of-rows-from-postgres-to-elastic/185332/2 "2019-07-10T06:22:17Z")

</div>

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