On Tue, Jul 3, 2012 at 10:22 AM, Stanislaw Pankevich
s.pankev...@gmail.com wrote:
Hello,
My question below is almost exact copy of the on on SO:
http://stackoverflow.com/questions/11311079/postgresql-db-30-tables-with-number-of-rows-100-not-huge-the-fastest-way
The post on SO caused a few
If someone is interested with the current strategy, I am using for
this, see this Ruby-based repo
https://github.com/stanislaw/truncate-vs-count for both MySQL and
PostgreSQL.
MySQL: the fastest strategy for cleaning databases is truncation with
following modifications:
1) We check is table is
On 07/13/2012 03:50 PM, Stanislaw Pankevich wrote:
MySQL: the fastest strategy for cleaning databases is truncation with
following modifications:
1) We check is table is not empty and then truncate.
2) If table is empty, we check if AUTO_INCREMENT was changed. If it
was, we do a truncate.
For
Thanks for the answer.
Please, see my answers below:
On Fri, Jul 6, 2012 at 2:35 PM, Craig Ringer ring...@ringerc.id.au wrote:
On 07/06/2012 07:29 PM, Craig Ringer wrote:
On 07/03/2012 11:22 PM, Stanislaw Pankevich wrote:
I cannot! use transactions.
Everything in PostgreSQL uses
On Fri, Jul 6, 2012 at 4:38 PM, Craig Ringer ring...@ringerc.id.au wrote:
On 07/06/2012 07:38 PM, Daniel Farina wrote:
On Fri, Jul 6, 2012 at 4:29 AM, Craig Ringer ring...@ringerc.id.au
wrote:
1) Truncate each table. It is too slow, I think, especially for empty
tables.
Really?!? TRUNCATE
On Fri, Jul 6, 2012 at 4:39 PM, Albe Laurenz laurenz.a...@wien.gv.at wrote:
Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows 100 (not huge) - the
fastest way to clean each
non-empty table and reset unique identifier column of empty ones
I wonder, what is
On Fri, Jul 6, 2012 at 5:22 PM, Craig Ringer ring...@ringerc.id.au wrote:
On 07/06/2012 09:45 PM, Stanislaw Pankevich wrote:
Question: Is there a possibility in PostgreSQL to do DELETE on many tables
massively, like TRUNCATE allows. Like DELETE table1, table2, ...?
Yes, you can do it with a
Interesting catch, I will try to test the behavior of 'DELETE vs
multiple TRUNCATE'.
I'll post it here, If I discover any amazing results.
On Fri, Jul 6, 2012 at 2:38 PM, Daniel Farina dan...@heroku.com wrote:
On Fri, Jul 6, 2012 at 4:29 AM, Craig Ringer ring...@ringerc.id.au wrote:
1)
Marc, thanks for the answer.
Na, these seem not to be enough universal and easy to hook into
existing truncation strategies used in Ruby world.
On Fri, Jul 6, 2012 at 6:24 PM, Marc Mamin m.ma...@intershop.de wrote:
Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows
Hello,
My question below is almost exact copy of the on on SO:
http://stackoverflow.com/questions/11311079/postgresql-db-30-tables-with-number-of-rows-100-not-huge-the-fastest-way
The post on SO caused a few answers, all as one stating DO ONLY TRUNCATION
- this is the fast.
Also I think I've
On 07/03/2012 11:22 PM, Stanislaw Pankevich wrote:
I cannot! use transactions.
Everything in PostgreSQL uses transactions, they are not optional.
I'm assuming you mean you can't use explicit transaction demarcation, ie
BEGIN and COMMIT.
need the fastest cleaning strategy for such case
On 07/06/2012 07:29 PM, Craig Ringer wrote:
On 07/03/2012 11:22 PM, Stanislaw Pankevich wrote:
I cannot! use transactions.
Everything in PostgreSQL uses transactions, they are not optional.
I'm assuming you mean you can't use explicit transaction demarcation,
ie BEGIN and COMMIT.
need
On Fri, Jul 6, 2012 at 4:29 AM, Craig Ringer ring...@ringerc.id.au wrote:
1) Truncate each table. It is too slow, I think, especially for empty
tables.
Really?!? TRUNCATE should be extremely fast, especially on empty tables.
You're aware that you can TRUNCATE many tables in one run, right?
On 07/06/2012 07:38 PM, Daniel Farina wrote:
On Fri, Jul 6, 2012 at 4:29 AM, Craig Ringer ring...@ringerc.id.au wrote:
1) Truncate each table. It is too slow, I think, especially for empty
tables.
Really?!? TRUNCATE should be extremely fast, especially on empty tables.
You're aware that you
Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows 100 (not huge) - the
fastest way to clean each
non-empty table and reset unique identifier column of empty ones
I wonder, what is the fastest way to accomplish this kind of task in
PostgreSQL. I am
On Friday, July 06, 2012 01:38:56 PM Daniel Farina wrote:
ll, I don't know a
mechanism besides slow file system truncation time that would explain
why DELETE would be significantly faster.
There is no filesystem truncation happening. The heap and the indexes get
mapped into a new file.
On 07/06/2012 09:45 PM, Stanislaw Pankevich wrote:
Question: Is there a possibility in PostgreSQL to do DELETE on many
tables massively, like TRUNCATE allows. Like DELETE table1, table2, ...?
Yes, you can do it with a writable common table expression, but you
wanted version portability.
Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows 100 (not huge) - the
fastest way to clean each
non-empty table and reset unique identifier column of empty ones
I wonder, what is the fastest way to accomplish this kind of task in
PostgreSQL. I am
Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows 100 (not huge) - the
fastest way to clean each
non-empty table and reset unique identifier column of empty ones
Hello,
2 'exotic' ideas:
- use dblink_send_query to do the job in multiple threads (I doubt
On Fri, Jul 6, 2012 at 4:29 AM, Craig Ringer ring...@ringerc.id.au wrote:
On 07/03/2012 11:22 PM, Stanislaw Pankevich wrote:
1) Truncate each table. It is too slow, I think, especially for empty
tables.
Really?!? TRUNCATE should be extremely fast, especially on empty tables.
You're aware
On 07/03/2012 08:22 AM, Stanislaw Pankevich wrote:
PostgreSQL db, 30 tables with number of rows 100 (not huge) -
the fastest way to clean each non-empty table and reset unique
identifier column of empty ones
I wonder, what is the fastest way to accomplish this kind of task in
21 matches
Mail list logo