我需要将一个大.sql文件(解压时为 8.1GB)导入 PostgreSQL。我尝试使用,\i /path/to/file.sql但它太慢了。
如何加快进口?我需要每周导入这些数据。
在第一个2000行可以在这里找到,而压缩的1点GB转储可以在这里找到
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.3
-- Dumped by pg_dump version 9.5.2
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- Name: rpo; Type: SCHEMA; Schema: -; Owner: -
--
Run Code Online (Sandbox Code Playgroud)
这是我获取数据的唯一途径。完整的文件有大约。38,000,000 行。如何加快导入速度?
postgresql performance import pg-dump postgresql-performance