From: Shridhar Daithankar <shridhar_daithankar@persistent.co.in>
To: pgsql-general@postgresql.org
Subject: Re: Fast Deletion For Large Tables
Date: Fri, 04 Oct 2002 20:04:20 +0530
Message-ID: <3D9DF444.8941.11B2104@localhost> (raw)
In-Reply-To: <3D9B38F7.12A7AEA3@noaa.gov>
On 2 Oct 2002 at 14:20, Raymond Chui wrote:
> Everything is running fine, except take long time to finish.
> Because some tables stored values from 50,000 to 100,000 rows
> Some deletion need to deleted up to 45,000 rows.
That's not much. How much time it exactly takes? Does it have index on
timestamp field?
>
> So I am thinking just delete the rows by their row number or row ID,
> like
>
> DELETE FROM a_table WHERE row_id < 45000;
I don't think that's the problem. Do you have big enough WAL's for deleting
45000 records in one transaction? Try deleting them in batches or increase WAL
files and buffers..Should help you..
> I know there is row_id in Oracle.
> Is there row_id for a table in Postgres?
That's called as OIDs in postgresql. But as I said, it's likely that you might
not have sufficient;y big WAL. Try setting some higher values.. Or don't delete
in transactions if possible..
Bye
Shridhar
--
Consent decree: A document in which a hapless company consents never to commit
in the future whatever heinous violations of Federal law it never admitted to
in the first place.
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: shridhar_daithankar@persistent.co.in, pgsql-general@postgresql.org
Subject: Re: Fast Deletion For Large Tables
In-Reply-To: <3D9DF444.8941.11B2104@localhost>
References: <3D9B38F7.12A7AEA3@noaa.gov> <3D9DF444.8941.11B2104@localhost>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox