aajit75
2012-Feb-09 13:26 UTC
[R] Java heap space Error while reading table from postgres database using RJDBC
Hi List, I am reading table from postgres database into R session using RJDBC, table contains 150 columns and 200000 rows. Sample code is as below, which works fine with smaller tables. ######################################################################## db_driver <- mydir$db_driver db_jar_file <- mydir$db_jar_file db_server <- mydir$db_server db_server_lgn <- mydir$db_server_lgn db_server_pwd <- mydir$db_server_pwd library(RJDBC) drv <- JDBC(paste(db_driver, sep = ""), paste(db_jar_file, sep = ""), identifier.quote="`") conn <- dbConnect(drv, paste(db_server, sep = ""), paste(db_server_lgn, sep = ""), paste(db_server_pwd, sep = "")) cs_input_abt <- dbReadTable(conn, "cs_input_abt") ############################################################################ Following are the different error occurs after executing above script, every time different error when above script is executed. 1. Error in .jcall(rp, "I", "fetch", stride) : java.lang.OutOfMemoryError: Java heap space 2. Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", : Unable to retrieve JDBC result set for SELECT * FROM cs_input_abt (Could not initialize class org.postgresql.util.PSQLException) 3. Error in .verify.JDBC.result(r, "Unable to retrieve JDBC result set for ", : Unable to retrieve JDBC result set for SELECT * FROM bs_modelling_abt (GC overhead limit exceeded) Where am I going wrong? Is there any option which I had not used in the RJDBC connection or needed to add? [[elided Yahoo spam]] Ajit -- View this message in context: http://r.789695.n4.nabble.com/Java-heap-space-Error-while-reading-table-from-postgres-database-using-RJDBC-tp4372816p4372816.html Sent from the R help mailing list archive at Nabble.com.
Reasonably Related Threads
- Passing date as parameter while retrieving data from database using dbGetQuery
- Java Exception error while reading large data in R from DB using RJDBC.
- Segfault in deliver server
- RJDBC with MS Access
- dbHasCompleted() always returns TRUE for POSTGRES Database with RJDBC?