Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6985179
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T18:38:50+00:00 2026-05-27T18:38:50+00:00

Into : Currently i have scraped all the data into one PostgreSQL ‘Bigtable’ table(there

  • 0

Into:

Currently i have scraped all the data into one PostgreSQL ‘Bigtable’ table(there are about 1.2M rows). Now i need to split the design into separate tables which all have dependency on the Bigtable. Some of the tables might have subtables. The model looks pretty much like snowflake.

Problem:

What would be best option to inserting data into tables? I thought to make the insertion with functions written in ‘SQL’ or PLgSQL. But the problem is still with auto-generated ID-s.

Also if you know what tools might make this problem solving easier then post!

//Edit i have added example, this not the real case just for illustration.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T18:38:50+00:00Added an answer on May 27, 2026 at 6:38 pm

    1.2 M rows is not too much. The best tool is sql script executed from console “psql”. If you have a some newer version of Pg, then you can use inline functions (DO statement) when it is necessary. But probably the most useful command is INSERT INTO SELECT statement.

    -- file conversion.sql
    DROP TABLE IF EXISTS f1 CASCADE;
    CREATE TABLE f1(a int, b int);
    INSERT INTO f1
       SELECT x1, y1 
          FROM data
         WHERE x1 = 10;
    
        ...
    
    -- end file
    
    psql mydb -f conversion.sql
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently have : LOAD DATA LOCAL INFILE '/Users/RkG/Desktop/Microblogs.csv' INTO TABLE blogs This is an
I currently have three methods which I want to collapse into one: def send_email(contact,email)
I currently have a dropdown box which enters an integer into a table. It's
In my app, i currently have all my code separated into a static library,
I currently have two SQL statements that I'd like to combine into one, and
I currently have a webpage where an iframe contains data that is stored into
I currently have sensor data being dumped into a database. This is raw data,
I currently have Google Maps integrated into my webpage. It is being used to
I currently have a filesystem path I would like to index into a SQL
I currently have an extension Method which converts an IEnumerable of type Tab into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.