Skip to content

Commit 54d01bf

Browse files
hidekojiclaude
andcommitted
Raise the Oracle (OCI) bulkRead default to 200000 (tam#35892)
Benchmarked against the test database on a 231,868 row x 35 column table, the customer-reported scale, taking the median of three alternating runs: ODBC (FBS=10MB, what the app sends) 23.40 s OCI bulkRead=10000 6.81 s 3.4x OCI bulkRead=200000 4.64 s 5.0x The larger value costs memory - peak usage roughly doubled on a 30 column x 100,000 row fetch, 1.2 GB against 2.6 GB - but preview sized queries are unaffected: at 50 and 1,000 rows the two settings are within measurement noise of each other and about 45 MB apart, because ROracle allocates against the data actually fetched rather than reserving bulkRead rows up front. Speed was chosen over the smaller footprint; the value stays editable per connection for anyone importing very wide tables. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6b1970a commit 54d01bf

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: exploratory
22
Type: Package
33
Title: R package for Exploratory
4-
Version: 16.0.20
4+
Version: 16.0.21
55
Date: 2026-07-28
66
Authors@R: c(person("Hideaki", "Hayashi", email = "hideaki@exploratory.io", role = c("aut", "cre")), person("Hide", "Kojima", email = "hide@exploratory.io", role = c("aut")), person("Kan", "Nishida", email = "kan@exploratory.io", role = c("aut")), person("Kei", "Saito", email = "kei@exploratory.io", role = c("aut")), person("Yosuke", "Yasuda", email = "double.y.919.quick@gmail.com", role = c("aut")))
77
URL: https://github.com/exploratory-io/exploratory_func

R/system.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1086,7 +1086,7 @@ stripTrailingSemicolon <- function(query) {
10861086
getDBConnection <- function(type, host = NULL, port = "", databaseName = "", username = "", password = "", catalog = "", schema = "", dsn="", additionalParams = "",
10871087
collection = "", isSSL = FALSE, authSource = NULL, cluster = NULL, timeout = NULL, connectionString = NULL, driver = NULL, timezone = "",
10881088
subType = NULL, sslClientCertKey = "", sslCA = "", sslMode = "", role = "", authMethod = "", secretKeyFile = "", secretKeyFilePassword = "",
1089-
bulkRead = 10000) {
1089+
bulkRead = 200000) {
10901090

10911091
drv = NULL
10921092
conn = NULL
@@ -2013,7 +2013,7 @@ getDBConnection <- function(type, host = NULL, port = "", databaseName = "", use
20132013
}
20142014
bulkReadRows <- suppressWarnings(as.integer(bulkRead))
20152015
if (is.na(bulkReadRows) || bulkReadRows <= 0) {
2016-
bulkReadRows <- 10000L
2016+
bulkReadRows <- 200000L
20172017
}
20182018
# Force the NLS_LANG character set to AL32UTF8 for the duration of the connect, then put
20192019
# the user's own value back. OCI fixes the client character set when it creates its
@@ -2049,7 +2049,7 @@ getDBConnection <- function(type, host = NULL, port = "", databaseName = "", use
20492049
clearDBConnection <- function(type, host = NULL, port = NULL, databaseName, username, catalog = "", schema = "", dsn="", additionalParams = "",
20502050
collection = "", isSSL = FALSE, authSource = NULL, cluster = NULL, connectionString = NULL, timezone = "",
20512051
sslClientCertKey = "", sslCA = "", subType = NULL, driver = "", sslMode = '', role = '',
2052-
bulkRead = 10000) {
2052+
bulkRead = 200000) {
20532053
key <- ""
20542054
if (type %in% c("mongodb")) {
20552055
if(!is.na(connectionString) && connectionString != '') {
@@ -2309,7 +2309,7 @@ queryMySQL <- function(host, port, databaseName, username, password, numOfRows =
23092309
#' @param connectionString (optional) TNS alias, full connect descriptor, or EZConnect string.
23102310
#' When provided it is used as is and host, port and databaseName are ignored.
23112311
queryOracleOCI <- function(host = "", port = 1521, databaseName = "", username = "", password = "",
2312-
numOfRows = -1, query, timezone = "", bulkRead = 10000, connectionString = "", ...) {
2312+
numOfRows = -1, query, timezone = "", bulkRead = 200000, connectionString = "", ...) {
23132313
if (!requireNamespace("ROracle")) { stop("package ROracle must be installed.") }
23142314
if (!requireNamespace("DBI")) { stop("package DBI must be installed.") }
23152315

0 commit comments

Comments
 (0)