Status: New
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 64 by
guanghua...@gmail.com: why is it much faster running sql
under PostgreSQL than running sql using RPostgreSQL package?
https://code.google.com/p/rpostgresql/issues/detail?id=64
What I did is on the website
http://stackoverflow.com/questions/25177642/how-to-select-efficiently-in-a-very-large-table
I used RPostgreSQL package under R because I want to manipulate other files
at the same time. As you can see from the above website, the table is very
large. It will cost more than two hours to complete the selection using
RPostgreSQL. But today I use the same SQL code under PostgreSQL directly
instead of using RpostgreSQL. It only took several minutes. Why?
The code of R is:
sql='SELECT * into new_table FROM table_1 WHERE EXISTS (SELECT 1 FROM
table_2 WHERE column=table_1.column_1) AND EXISTS (SELECT 1 FROM table_2
WHERE column=table_1.column_2)'
rs=dbSendQuery(con,sql)
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings