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 6321765
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T16:12:35+00:00 2026-05-24T16:12:35+00:00

I have a couple of million rows in a postgresql table. I have up

  • 0

I have a couple of million rows in a postgresql table. I have up to 20 proceeses writing to that table (a few hundred inserts/updates per second) and I have a few processes reading from it at the same time (once a while a big select). This results in many failures (Stream Closed, Input/Ouput Error) on both sides, reading and writing.

I now think about splitting that table into multiple tables. I would split by “type” of object, which is basically a field that has only 20 possible values that are kind of equally distributed.

The question is, should I use multiple tables, multiple schemas or multiple databases to guarantee a non blocking access to the data. Or maybe I should use a completly different setup. Another database maybe? Maybe HTable?

The integrity of the data is not that important. It has to be there in the end but I do not really need an Isolation Level or Transactions. I just need a fast system that can write and read from multiple processes without performance impact and that allows to make queries based on field values.

Right now I use JDBC with Isolation Level TRANSACTION_READ_UNCOMMITTED and a connection per process.

UPDATE:

The schema looks as follows:

CREATE TABLE rev
(
  id integer NOT NULL,
  source text,
  date timestamp with time zone,
  title text,
  summary text,
  md5sum text,
  author text,
  content text,
  CONSTRAINT rev_id_pk PRIMARY KEY (id),
  CONSTRAINT md5sum_un UNIQUE (md5sum)
)

CREATE TABLE resp
(
  id integer NOT NULL,
  source text,
  date timestamp with time zone,
  title text,
  summary text,
  md5sum text,
  author text,
  content text,
  CONSTRAINT resp_id_pk PRIMARY KEY (id),
  CONSTRAINT md5sum_un UNIQUE (md5sum)
)

And I have a few indexes on some of the fields.

A sample query looks like:

SELECT * FROM rev LEFT JOIN resp ON rev.id = resp.parent_id WHERE rev.date > ? LIMIT 1000 OFFSET ?

The resp table is much smaller, but it too gets updates and is queried in the joins.

  • 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-24T16:12:36+00:00Added an answer on May 24, 2026 at 4:12 pm

    This results in many failures on both sides, reading and writing.

    What kind of failures? Reading and writing on the same table should not be a problem at all in PostgreSQL, MVCC works fine.

    Hard to tell you how to fix your problems without any information about the system and what the processes are doing. Could you tell us more about it? And show a database schema?

    Right now I use JDBC with Isolation Level TRANSACTION_READ_UNCOMMITTED

    READ UNCOMMITTED doesn’t exist in PostgreSQL, it’s treated like Read Committed:

    In PostgreSQL, you can request any of the four standard transaction
    isolation levels. But internally, there are only two distinct
    isolation levels, which correspond to the levels Read Committed and
    Serializable. When you select the level Read Uncommitted you really
    get Read Committed, and when you select Repeatable Read you really get
    Serializable, so the actual isolation level might be stricter than
    what you select.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets say I have a table containing several hundred million rows that looks something
I have a table with way too many columns and a couple million rows
I have a couple of triggers on a table that I want to keep
I have a script that appends some rows to a table. One of the
I have a couple old services that I want to completely uninstall. How can
I have a SQL 2000 database with around 10 million rows and I need
I have a couple large tables (188m and 144m rows) I need to populate
I have a couple of controls that are set to runat=server, but are showing
I have a stored procedure which deletes a couple of million records and then
I'll have couple of python functions I must interface with from the assembly code.

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.