有没有办法估计从数据库中收集大型表所需的内存量?(Is there a way to estimate amount of memory required when collecting a larg

编程入门 行业动态 更新时间:2024-10-05 05:24:58
有没有办法估计从数据库中收集大型表所需的内存量?(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.

更多推荐

本文发布于:2023-07-09 10:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1085560.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:所需   存量   没有办法   数据库中   estimate

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!