PostgreSQL에 데이터를 빠르게로드하려고합니다. pgloader https://github.com/dimitri/pgloader을 사용하기 시작했고 병렬 로딩을 사용하려고했습니다. 나는 다른 매개 변수로 땜질하고 있었지만 32 대가있는 내 컴퓨터에서 2 개 이상의 코어를 활성화 할 수 없었습니다. 설명서 https://github.com/dimitri/pgloader/blob/master/pgloader.1.md을 발견하고 여기에 설명 된 일괄 처리 옵션을 설정하려고했습니다. 현재, 나는 이러한 설정이 : 나는이 질문에 도착pgloader - PostgreSQL에 대한 빠른 데이터로드
LOAD CSV
FROM '/home/data1_1.csv'
--FROM 'data/data.csv'
INTO postgresql://:[email protected]:5432/test?test
WITH truncate,
skip header = 0,
fields optionally enclosed by '"',
fields escaped by double-quote,
fields terminated by ',',
batch rows = 100,
batch size = 1MB,
batch concurrency = 64
SET client_encoding to 'utf-8',
work_mem to '10000MB',
maintenance_work_mem to '20000 MB'