group :development, :test do gem 'byebug', platform: :mri gem 'sqlite3', '~> 1.3.13' end group :production do gem 'pg' end 修改 Gemfile bundle install Rails.application.routes.draw do resources :topics root "topics#index" end 修改routes.rb 注意:修改首
代码地址:postgresql-13.1-ml: Integration of CardEst Methods into PostgreSQL by HTTP Server (github.com) 当前进度:可以支持单表查询的基数估计模块的替换.至于多表join的基数估计模块替换还在开发中 注意:本文的重点在于PG的修改.记录一下我的修改思路. 整体流程 PG作为http客户端,向基数估计服务端发送http请求.内容为需要基数估计的sql语句. 基数估计服务端返回该语句的selectivity
1.查看参数文件位置 postgres=# show config_file; config_file ---------------------------------- /data/pgsql_data/postgresql.conf (1 row) postgres=# show hba_file; hba_file ------------------------------ /data/pgsql_data/pg_hba.conf (1 row) postgres=# show ide
PG CREATEINDEX CONCURRENTLY [TOC] 官方说法 根据9.1的文档 Creating an index can interfere with regular operation of a database. Normally PostgreSQL locks the table to be indexed against writes and performs the entire index build with a single scan of the table