You can use the read.dbi.ffdf and read.odbc.ffdf function in package ETLUtils. These allow you to fetch a query directly in an ffdf. See the examples in their corresponding documentation ?read.dbi.ffdf and ?read.odbc.ffdf or look at this blog post http://www.bnosac.be/index.php/blog/21-readodbcffdf-a-readdbiffdf-for-fetching-large-corporate-sql-data.
But as you are new to R and package ff might not be the best starting package when you are a newcomer, I suggest you first try to make a simple connection using ODBC or using the package RPostgreSQL in order to connect to your database. Once you can connect, use the same connection parameters in read.dbi.ffdf or read.odbc.ffdf to fetch your large dataset. good luck -- View this message in context: http://r.789695.n4.nabble.com/FF-package-downloading-a-large-file-using-sqlQuery-tp4642456p4643393.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.