# DB Looping Node

**URL:** <https://forum.knime.com/t/db-looping-node/46525>\
**Category:** KNIME Analytics Platform\
**Created:** [August 29, 2022, 12:36pm UTC](https://forum.knime.com/t/db-looping-node/46525 "2022-08-29T12:36:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![clac2188](https://forum-cdn.knime.com/user_avatar/forum.knime.com/clac2188/32/880_2.png) [@clac2188](https://forum.knime.com/u/clac2188)\
**Post date:** [August 29, 2022, 12:36pm UTC](https://forum.knime.com/t/db-looping-node/46525/1 "2022-08-29T12:36:26Z")

</div>

I have just tried using the new DB Looping Node. I am finding that it suffers the same limitations as legacy approaches; namely that it cannot accept a large list for the IN statement. Therefore a loop of several (or many times) over the database is still necessary, which is of course very slow. Am I missing something? Can a large list be used and loop over the database only once?

---

<div class="post-metadata">

**Author:** ![tobias.koetter](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tobias.koetter/32/56844_2.png) [@tobias.koetter](https://forum.knime.com/u/tobias.koetter)\
**Post date:** [August 31, 2022, 9:12am UTC](https://forum.knime.com/t/db-looping-node/46525/2 "2022-08-31T09:12:54Z")

</div>

Hello @clac2188 ,

what database and settings are you using? What is the error message you get? Some databases have various limitations regarding the statement size e.g. Oracle supports only 1000 values in an IN statement whereas other DBs limit the total size of the statement.  
I assume you have adapted the “No of values per query” parameter with a larger number or have enabled the “Read all” option.

Bye  
Tobias

---

<div class="post-metadata">

**Author:** ![clac2188](https://forum-cdn.knime.com/user_avatar/forum.knime.com/clac2188/32/880_2.png) [@clac2188](https://forum.knime.com/u/clac2188)\
**Post date:** [August 31, 2022, 6:50pm UTC](https://forum.knime.com/t/db-looping-node/46525/3 "2022-08-31T18:50:56Z")

</div>

Hi Tobias - I am using Oracle database and hitting the 1000 limit because, I guess, the DB Query Reader is doing a passthrough query. When faced with an input list many times larger than 1000, it is quite slow to have to pass a sub list many times to the database. I had hoped that the DB Looping Node would approach this dilemma, but apparently, it does not. Correct?

---

<div class="post-metadata">

**Author:** ![tobias.koetter](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tobias.koetter/32/56844_2.png) [@tobias.koetter](https://forum.knime.com/u/tobias.koetter)\
**Post date:** [September 13, 2022, 3:27pm UTC](https://forum.knime.com/t/db-looping-node/46525/4 "2022-09-13T15:27:52Z")

</div>

Hello @clac2188 ,  
you are correct. The node works with what the database allows us to do and does not create any special lookup tables or something similar in the backend which might cause problems with missing permissions etc.  
Bye  
Tobias

---

<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:** [December 12, 2022, 3:28pm UTC](https://forum.knime.com/t/db-looping-node/46525/5 "2022-12-12T15:28:28Z")

</div>

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