# NOT RUN {
# example requires hflights
if (! require(hflights, quietly = TRUE))
stop("This example requires the \'hflights\' package")
# big dataset
data(hflights)
dim(hflights)
system(paste("createdb rpgtesting"))
opts = paste("-d rpgtesting")
system.time(copy_to(hflights, psql_opts = opts))
system.time(invisible(copy_from("hflights", psql_opts = opts)))
connect("rpgtesting")
begin()
## Sloooowwwwwww
## system.time(write_table(hflights))
system.time(invisible(read_table("hflights")))
rollback()
disconnect()
dropdb("rpgtesting")
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab