Re: [PERFORM] DELETE takes too much memory

2016-07-07 Thread Kouber Saparev
d_and_auditable_id" btree (auditable_type_id, auditable_id) "index_audits_on_created_at" btree (created_at) 2016-07-06 19:12 GMT+03:00 Merlin Moncure <mmonc...@gmail.com>: > On Mon, Jul 4, 2016 at 11:35 AM, Kouber Saparev <kou...@gmail.com> wrote: > > I tried to DELET

Re: [PERFORM] DELETE takes too much memory

2016-07-05 Thread Kouber Saparev
the amount of the deleted rows from the function: DELETE FROM audits.audits WHERE id <= last_synced_audits_id; GET DIAGNOSTICS counter = ROW_COUNT; RETURN counter; 2016-07-05 21:51 GMT+03:00 Josh Berkus <j...@agliodbs.com>: > On 07/04/2016 10:10 AM, Kouber Saparev wrote: > > N

Re: [PERFORM] DELETE takes too much memory

2016-07-04 Thread Kouber Saparev
No. There are AFTER triggers on other tables that write to this one though. It is an audits table, so I omitted all the foreign keys on purpose. 2016-07-04 20:04 GMT+03:00 Alvaro Herrera <alvhe...@2ndquadrant.com>: > Kouber Saparev wrote: > > I tried to DELETE about 7 milli

[PERFORM] DELETE takes too much memory

2016-07-04 Thread Kouber Saparev
tables refer to it. The size of the table itself is 19 GB (15% of 120 GB). So why the DELETE tried to put the entire table in memory, or what did it do to take so much memory? I am using 9.4.5. Regards, -- Kouber Saparev

[PERFORM] LIMIT confuses the planner (again)

2009-09-28 Thread Kouber Saparev
index. Any ideas? Regards, -- Kouber Saparev http://kouber.saparev.com/ -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] LIMIT confuses the planner

2009-02-24 Thread Kouber Saparev
Tom Lane wrote: Kouber Saparev kou...@saparev.com writes: Now the planner believes there're 910 rows, which is a bit closer to the real data: swing=# select avg(length) from (select username, count(*) as length from login_attempt group by username) as freq; avg

[PERFORM] LIMIT confuses the planner

2009-02-23 Thread Kouber Saparev
effective_cache_size = 2048MB Any idea what's wrong here? Regards, -- Kouber Saparev http://kouber.saparev.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance

Re: [PERFORM] LIMIT confuses the planner

2009-02-23 Thread Kouber Saparev
: 0.114 ms Now the planner believes there're 910 rows, which is a bit closer to the real data: swing=# select avg(length) from (select username, count(*) as length from login_attempt group by username) as freq; avg -- 491.6087310427555479 (1 row) -- Kouber Saparev

Re: [PERFORM] LIMIT confuses the planner

2009-02-23 Thread Kouber Saparev
, -- Kouber Saparev http://kouber.saparev.com -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance