[ 
https://issues.apache.org/jira/browse/CALCITE-2322?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17371618#comment-17371618
 ] 

Zac commented on CALCITE-2322:
------------------------------

{quote}In other words: suppose you configure fetch_row_count=42, and you do not 
call setFetchSize with Java API. Is the system allowed to fetch 1000 rows 
behind the scenes?
{quote}
It seems reasonable that fetch_row_count could also be _just_ a hint and not a 
mandate, given that is what 
[setFetchSize|https://docs.oracle.com/javase/8/docs/api/java/sql/Statement.html#setFetchSize-int-]
 does:
{quote}Gives the JDBC driver a hint as to the number of rows that should be 
fetched from the database
{quote}
 

Furthermore, it seems like in the future, "dynamic fetch" would have a separate 
configuration that would be parallel to fetch_row_count (the user would not 
both set an explicit row count and whatever the corresponding "dynamic fetch" 
configuration is), and the documentation could clearly state that using both 
would have undefined results (or throw an exception, etc).
----
 

Regarding the name, I do see your point, but (FWIW) I personally find 
"default_" to be a confusing prefix. In my mind, a default value is what's used 
when no other value is specified. So to be explicitly setting a value named 
default seems confusing (possibly there's some synonym of default that would 
work, but i'm not coming up with anything).

 

That said, i'll change it to whatever you and [~julianhyde] decide. I'm 
definitely fine with changing it to fetch_size_rows. 

 

[~julianhyde] - are you ok with "fetch_size_rows" (/ would you prefer to name 
it "default_fetch_size_rows")? 

 

> Add fetch size support to connection url and JDBC statement
> -----------------------------------------------------------
>
>                 Key: CALCITE-2322
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2322
>             Project: Calcite
>          Issue Type: Improvement
>          Components: avatica, core
>    Affects Versions: 1.11.0
>            Reporter: Kevin Minder
>            Priority: Major
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Currently the remote driver defaults to hard coded fetch size of 100 rows.  
> When a connection is operating in HTTP mode having such a small fetch size 
> can add enormous overhead.  This is especially true if TLS connections are 
> used and made worse if each connection flows throw multiple proxies.  
> Consider that 100K rows returned 100 rows at a time will make 1K HTTP POST 
> requests.  One might say that nobody should ever do that but some tools like 
> Spotfire may end up doing this.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to