JDBC driver: Statement#setMaxRows()
I have big tables with billions of rows. If I click accidentally on DBVisualizer's data tab, or, if the data tab of a small table is opened and I click on a big table, DBVisualizer tries to retrieve all rows. Then I have to kill DBVisualizer process and/or the DB server process. Answer of DBVisualizer's team: "Hi Robert, It seems like the JDBC driver does not implement the Statement#setMaxRows() method. Please contact your driver developer about this problem." Is the Statement#setMaxRows() method implemented?
Hi,
On 24 Nov 2014, at 09:52, Robert Koch
wrote: I have big tables with billions of rows. If I click accidentally on DBVisualizer's data tab, or, if the data tab of a small table is opened and I click on a big table, DBVisualizer tries to retrieve all rows. Then I have to kill DBVisualizer process and/or the DB server process.
Answer of DBVisualizer's team:
"Hi Robert, It seems like the JDBC driver does not implement the Statement#setMaxRows() method. Please contact your driver developer about this problem."
I’ll look into it. Best, Hannes
Hi all,
On 24 Nov 2014, at 09:52, Robert Koch
wrote: I have big tables with billions of rows. If I click accidentally on DBVisualizer's data tab, or, if the data tab of a small table is opened and I click on a big table, DBVisualizer tries to retrieve all rows. Then I have to kill DBVisualizer process and/or the DB server process.
Answer of DBVisualizer's team:
"Hi Robert, It seems like the JDBC driver does not implement the Statement#setMaxRows() method. Please contact your driver developer about this problem."
Is the Statement#setMaxRows() method implemented? Yes, and I have confirmed it to work correctly on the protocol level. Using the setMaxRows(n) function will lead to only the first n rows being transferred. However, MonetDB still computes the entire result set internally. This might explain the issues you have seen. A possible solution would be for DBVisualizer to use the LIMIT command within their exploratory queries or push this information down from JDBC.
Best Hannes
participants (2)
-
Hannes Mühleisen
-
Robert Koch