# Database Writer to MySQL performance issues

**URL:** <https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443>\
**Category:** KNIME Analytics Platform\
**Created:** [October 7, 2017, 12:25am UTC](https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443 "2017-10-07T00:25:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dh](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/d/c68b51/32.png) [@dh](https://forum.knime.com/u/dh)\
**Post date:** [October 7, 2017, 12:25am UTC](https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443/1 "2017-10-07T00:25:29Z")

</div>

Hi All,

I am attempting to use the database writer node to write to a MySQL database however, when executing the node, it is extremely slow -- roughly 10 rows/second.

The profile of my data is 15 columns, 255K rows -- primarily varchars of various lengths.

After browsing the net, I have added the following to my INI file.. I would note that the fetch size has DRAMATICALLY improved my performance using the Database Reader node.

-Xmx4g  
–Dknime.compress.io=false  
-Dknime.database.fetchsize=1000

Is there anything else I can do to improve my database writing performance?&nbsp;

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![marten\_kose](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/a87d85/32.png) [@marten\_kose](https://forum.knime.com/u/marten_kose)\
**Post date:** [October 12, 2017, 9:44am UTC](https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443/2 "2017-10-12T09:44:14Z")

</div>

Hi dh,

with the database.fetchsize you already found the parameter to tweak db-performance within KNIME. Everything else mostly relies on the network connection or the DB itself. This topic has also been discussed in the following&nbsp;thread:&nbsp;[https://www.knime.com/forum/knime-users/knime-performance-reading-from-a-database](https://www.knime.com/forum/knime-users/knime-performance-reading-from-a-database)&nbsp;(which I assume you already read).

Cheers,  
Marten

---

<div class="post-metadata">

**Author:** ![GQRanalytics](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/g/ee7513/32.png) [@GQRanalytics](https://forum.knime.com/u/GQRanalytics)\
**Post date:** [March 12, 2019, 2:33am UTC](https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443/3 "2019-03-12T02:33:08Z")

</div>

Hey there, I had the same issue… and was able to solve it really simply, KNIME has a KNIME.ini file, this one is like the paramethers KNIME uses to execute…

The real issue is that JBDC driver is set for 10 Fetch Size. By default, when Oracle JDBC runs a query, it retrieves a result set of **10 rows** at a time from the database cursor. This is the default Oracle row fetch size value… so whenever you are reading database you will have a big pain waiting to retrieve all the lines.

The fix is simply, go to the folder where KNIME is installed, look for the file KNIME.ini, open it and then add the following sentences to the bottom, it will override the defauld JBDC fetching, and then you will get the data in literally seconds.

-Dknime.database.fetchsize=50000  
-Dknime.url.timeout=9000

Hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 23, 2023, 8:27pm UTC](https://forum.knime.com/t/database-writer-to-mysql-performance-issues/9443/4 "2023-06-23T20:27:32Z")

</div>


