有没有办法估计从数据库中收集大型表所需的内存量?(Is there a way to estimate amount of memory required when collecting a large table from a database?)
我使用dplyr在我的数据库中完成了一些复杂的计算,包含一对多连接,然后过滤结果,这样我就不再真正知道我的计算机内存是否足以收集我的计算结果,例如
library(dplyr) tbl(src_con, 'table_name') %>% inner_join(...) %>% filter(...) %>% inner_join(...) %>% ... %>% # more stuff collect(n = Inf) # will this crash the computer?什么是一种有效的方法来估计结果的tibble是否太大而不适合内存? 我使用的是dplyr 0.5.0和PostgreSQL 9.5。
I have done some complicated computations inside my database using dplyr, containing one-to-many joins and then filtering results, so that I no longer really know whether my computer memory is sufficient to collect the results of my computation, e.g.
library(dplyr) tbl(src_con, 'table_name') %>% inner_join(...) %>% filter(...) %>% inner_join(...) %>% ... %>% # more stuff collect(n = Inf) # will this crash the computer?What is an efficient way of estimating whether the resultant tibble will be too large to fit in memory? I am using dplyr 0.5.0 and PostgreSQL 9.5.
更多推荐
发布评论