当前位置: 首页 > news >正文

网站seo优化心得wordpress企业模板破解

网站seo优化心得,wordpress企业模板破解,绵阳网站建设推广,陕西免费做网站1 前言 本文件的源码来自PostgreSQL 14.5#xff0c;其它版本略有不同并行workers并不能显箸提升性能。个人不建议使用并行worker进程#xff0c;大多数情况下采用postgresql.conf默认配置即可。 PostgreSQL的并行workers是由compute_parallel_worker函数决定的#xff0c…1 前言 本文件的源码来自PostgreSQL 14.5其它版本略有不同并行workers并不能显箸提升性能。个人不建议使用并行worker进程大多数情况下采用postgresql.conf默认配置即可。 PostgreSQL的并行workers是由compute_parallel_worker函数决定的compute_parallel_worker是估算扫描所需的并行工作线程数并不是您在postgresql.conf中设置的max_parallel_workers_per_gather数量compute_parallel_worker会根据heap_pages、index_pages、max_workers(max_parallel_workers_per_gather)来决定并行工作线程数量。 2 源码和调用位置 compute_parallel_worker共有4个地方调用 src\backend\optimizer\path\allpaths.c(801,21) src\backend\optimizer\path\allpaths.c(3724,21) src\backend\optimizer\path\costsize.c(707,33) src\backend\optimizer\plan\planner.c(5953,21)compute_parallel_worker的声明 src\include\optimizer\paths.h(59,12)compute_parallel_worker的实现 src\backend\optimizer\path\allpaths.c(3750,1)compute_parallel_worker的源码 /** Compute the number of parallel workers that should be used to scan a* relation. We compute the parallel workers based on the size of the heap to* be scanned and the size of the index to be scanned, then choose a minimum* of those.** heap_pages is the number of pages from the table that we expect to scan, or* -1 if we dont expect to scan any.** index_pages is the number of pages from the index that we expect to scan, or* -1 if we dont expect to scan any.** max_workers is callers limit on the number of workers. This typically* comes from a GUC.* max_workers就是postgresql.conf中max_parallel_workers_per_gather的值*/ int compute_parallel_worker(RelOptInfo *rel, double heap_pages, double index_pages,int max_workers) {int parallel_workers 0;/** If the user has set the parallel_workers reloption, use that; otherwise* select a default number of workers.* 不需要优化直接来自表级存储参数parallel_workers* 详见第3节直接使用postgresql.conf中设置的max_parallel_workers_per_gather数量*/if (rel-rel_parallel_workers ! -1)parallel_workers rel-rel_parallel_workers;else{/** If the number of pages being scanned is insufficient to justify a* parallel scan, just return zero ... unless its an inheritance* child. In that case, we want to generate a parallel path here* anyway. It might not be worthwhile just for this relation, but* when combined with all of its inheritance siblings it may well pay* off.*/if (rel-reloptkind RELOPT_BASEREL ((heap_pages 0 heap_pages min_parallel_table_scan_size) ||(index_pages 0 index_pages min_parallel_index_scan_size)))return 0;if (heap_pages 0){int heap_parallel_threshold;int heap_parallel_workers 1;/** Select the number of workers based on the log of the size of* the relation. This probably needs to be a good deal more* sophisticated, but we need something here for now. Note that* the upper limit of the min_parallel_table_scan_size GUC is* chosen to prevent overflow here.*/heap_parallel_threshold Max(min_parallel_table_scan_size, 1);while (heap_pages (BlockNumber) (heap_parallel_threshold * 3)){heap_parallel_workers;heap_parallel_threshold * 3;if (heap_parallel_threshold INT_MAX / 3)break; /* avoid overflow */}parallel_workers heap_parallel_workers;}if (index_pages 0){int index_parallel_workers 1;int index_parallel_threshold;/* same calculation as for heap_pages above */index_parallel_threshold Max(min_parallel_index_scan_size, 1);while (index_pages (BlockNumber) (index_parallel_threshold * 3)){index_parallel_workers;index_parallel_threshold * 3;if (index_parallel_threshold INT_MAX / 3)break; /* avoid overflow */}if (parallel_workers 0)parallel_workers Min(parallel_workers, index_parallel_workers);elseparallel_workers index_parallel_workers;}}/* In no case use more than caller supplied maximum number of workers */parallel_workers Min(parallel_workers, max_workers);return parallel_workers; }3 直接使用postgresql.conf中设置的max_parallel_workers_per_gather数量 如果要使用指定数量的并行worker数必须使用存储参数parallel_workers。 alter table tab set (parallel_workers8);配置了存储参数后compute_parallel_worker就不在对并行worker数优化直接返回配置的parallel_workers数量。 if (rel-rel_parallel_workers ! -1)parallel_workers rel-rel_parallel_workers;注意如果不设置表级存储参数parallel_workers实际的并行工作线程数由compute_parallel_worker根据heap_pages、index_pages、max_workers来决定并行工作线程数量因此会出现实际并行工作数量不等于postgresql.conf中设置的max_parallel_workers_per_gather的情况。 在次强制并行workers并不能显箸提升性能。个人不建议使用并行worker进程大多数情况下采用postgresql.conf默认配置即可。
http://www.pierceye.com/news/162050/

相关文章:

  • 罗湖网站建设费用帮忙做文档的网站
  • 如何在720云网站做全景视频域名注册网站查询工具
  • 网站定制开发流程和功能wordpress怎么看访问
  • 浙江省互联网建设网站python开发手机网站开发
  • 做网站需要多少钱一年动漫制作技术是学什么
  • 刘洋网站建设 够完美保卫处网站建设
  • 个人怎么申请营业执照北京朝阳区优化
  • 免费的舆情网站不用下载直接打开江西城乡建设网站
  • 那些网站是做金融行业网站主目录权限配置
  • 本地网站做不大wordpress 安全设置
  • 宁波教育平台网站建设广告行业怎么找客户
  • php企业网站开发实验总结商城网站建设模板
  • 单词优化和整站优化建设银行的网站特点
  • 厦门淘宝网站设计公司wordpress大前端dux5.2
  • 淮南网站seo网络信息发布平台
  • 网站自己做流量如何查询网站被百度收录情况
  • 网络营销网站源码做网站中怎么设置单张图片
  • 怎么做淘宝客网站网站定位代码
  • 自己给网站做logo卓成建设集团有限公司网站
  • 西宁建设网站软件徐州集团网站建设公司
  • 做网站卖设备找哪家好百度智能云windows系统服务器建站
  • 长沙企业做网站专门查企业信息的网站
  • 比较权威的房产网站百度网盘官网登陆入口
  • 金融商城快捷申请网站模板下载安全电子商务网站设计
  • 公司网站建设重要性天津建设交培训中心网站
  • 成都网站制作东三环论文一区二区三区是什么意思
  • 织梦图片瀑布流网站模板成都大型网站维护公司
  • 企业信息网站wordpress怎么调用m3u8视频
  • 前端怎么接私活做网站中文h5编程工具
  • wordpress模板 站长营销型网站开发