202101-08 查询PostgreSQL占多大内存的操作 我就废话不多说了,大家还是直接看代码吧~selectpg_size_pretty(pg_relation_size('cuiyonghua.top_iqiyi_info'));selectpg_size_pretty(pg_relation_size('cuiyonghua.top_mgtv_info'));selectpg_size_pretty(pg_relation_size('cuiyonghua.top_tencent_info'));selectpg_size_pretty(pg_relation_size('cuiyonghua.top_zhihu_info'));补充:PostgreSQL配置内存参数对于任何数据库软件,内存配置项都是很重要的配置项。在Po... 继续阅读 >
202009-24 php查看一个变量的占用内存的实例代码 事例:php版本为7.2<?phpechomemory_get_usage(),'<br>';$start=memory_get_usage();$a=Array();for($i=0;$i<1000;$i++){$a[$i]=$i+$i;}$mid=memory_get_usage();echomemory_get_usage(),'<br>';for($i=1000;$i<2000;$i++){$a[$i]=$i+$i;}$end=memory_get_usage();echomemory_get_usage(),'<br>';echo'argv:',($mid-$start)/1000,'bytes','<br>';echo'argv:',($end-$mid)/1000,'b... 继续阅读 >