Sample Header Ad - 728x90

POSTGRES : Data import

-1 votes
1 answer
46 views
DB Version : 13.x 1. Source table schema\
CREATE TABLE mig_bus_data
          mig_id  SERIAL,
          mig_data JSONB
2. Target table schema\
CREATE TABLE BUSINESS
       id   UNIQUE SERIAL,
      data1  ,
      data2  ,
      .
      .
3. All indexes on target table dropped 4. Data being imported in blocks of 100 records in parallel using\ Process 1
CURSOR 
     select mig_data from mig_bus_data LIMIT 100  OFFSET 0
Process 2
CURSOR 
     select mig_data from mig_bus_data LIMIT 100  OFFSET 100
   .
   .
Notes : 1. After dropping indexes and doing step 4, there is no significant performance gain. Any pointer to increase speed would help.
Asked by CSP (11 rep)
Feb 20, 2024, 10:48 PM
Last activity: Feb 21, 2024, 07:33 PM