先解压版本对应驱动包,使用root用户将psycopg2拷贝到python安装目录下的site-packages文件夹下。 b. 修改psycopg2目录权限为755。 c. 将psycopg2目录添加到环境变量$PYTHONPATH,并使之生效。 d. 对于非数据库用户,需要将解压后的lib目录,配置在LD_LIBRARY_PATH中。
teledb=# set max_parallel_workers_per_gather to 0; SET Time: 0.214 ms teledb=# select count(1) from t_count; count ---------- 20000000 (1 row) Time: 2700.569 ms (00:02.701) teledb=# set max_parallel_workers_per_gather to 2; SET Time: 0.269 ms teledb=#
teledb=# set max_parallel_workers_per_gather to 0; SET Time: 0.214 ms teledb=# select count(1) from t_count; count ---------- 20000000 (1 row) Time: 2700.569 ms (00:02.701) teledb=# set max_parallel_workers_per_gather to 2; SET Time: 0.269 ms teledb=#
teledb=# set max_parallel_workers_per_gather to 0; SET Time: 0.214 ms teledb=# select count(1) from t_count; count ---------- 20000000 (1 row) Time: 2700.569 ms (00:02.701) teledb=# set max_parallel_workers_per_gather to 2; SET Time: 0.269 ms teledb=#
teledb=# set max_parallel_workers_per_gather to 0; SET Time: 0.214 ms teledb=# select count(1) from t_count; count ---------- 20000000 (1 row) Time: 2700.569 ms (00:02.701) teledb=# set max_parallel_workers_per_gather to 2; SET Time: 0.269 ms teledb=#