Re: Allow DELETE to use ORDER BY and LIMIT/OFFSET

From: Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Allow DELETE to use ORDER BY and LIMIT/OFFSET
Date: 2021-12-17 05:56:58
Message-ID: 20211217145658.c110328b9ef7692951e009dd@sraoss.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 16 Dec 2021 20:56:59 -0700
"David G. Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com> wrote:

> On Thursday, December 16, 2021, Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp> wrote:
>
> >
> > Also, here seem to be some use cases. For example,
> > - when you want to delete the specified number of rows from a table
> > that doesn't have a primary key and contains tuple duplicated.
>
>
> Not our problem…use the tools correctly; there is always the hack
> work-around for the few who didn’t.
>
>
> > - when you want to delete the bottom 10 items with bad scores
> > (without using rank() window function).
>
>
> This one doesn’t make sense to me.
>
> - when you want to delete only some of rows because it takes time
> > to delete all of them.
> >
> >
> This seems potentially compelling though I’d be more concerned about the
> memory aspects than simply taking a long amount of time. If this is a
> problem then maybe discuss it without having a solution-in-hand? But given
> the intense I/O cost that would happen spreading this out over time seems
> acceptable and it should be an infrequent thing to do. Expecting users to
> plan and execute some custom code for their specific need seems reasonable.
>
> So even if Tom’s technical concerns aren’t enough working on this based
> upon these uses cases doesn’t seem of high enough benefit.

Thank you for your comments.
Ok. I agree that there are not so strong use cases.

Regards,
Yugo Nagata

--
Yugo NAGATA <nagata(at)sraoss(dot)co(dot)jp>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2021-12-17 06:40:10 Re: [PATCH] Accept IP addresses in server certificate SANs
Previous Message Fujii Masao 2021-12-17 05:50:37 Re: Allow escape in application_name