Re: Deletion Challenge

From: Benjamin Smith <lists(at)benjamindsmith(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Deletion Challenge
Date: 2015-12-15 02:03:54
Message-ID: 7459510.OaUqLR0OgK@tesla.schoolpathways.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> test=> delete from cash_journal where ARRAY[click, cash_journal_id] NOT in
> (select max(ARRAY[click,cash_journal_id]) from cash_journal group by
> fairian_id); DELETE 7

For what it's worth, we've run into *severe* performance issues using in() if
there are a large number of values in conjunction with a complex query. (EG:
more than 10,000) Using a with() prefix table and joining against that doesn't
seem to carry anything like a similar performance penalty.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Jim Nasby 2015-12-15 02:24:56 Re: HELP!!! The WAL Archive is taking up all space
Previous Message Benjamin Smith 2015-12-15 02:00:15 Re: Deletion Challenge