pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Gierth <andrew@tao11.riddles.org.uk>
To: Vladimir Ryabtsev <greatvovan@gmail.com>
Cc: tgl@sss.pgh.pa.us
Cc: pgsql-performance@lists.postgresql.org
Subject: Re: Why Postgres doesn't use TID scan?
Date: Wed, 19 Dec 2018 11:41:27 +0000
Message-ID: <87bm5hwxy2.fsf@news-spur.riddles.org.uk> (raw)
In-Reply-To: <CAMqTPq=4Qp80Qt11DdHjjzM4ksp7O0wTmDQexSUbo2sEoTk+hQ@mail.gmail.com>
References: <CAMqTPq=hNg0GYFU0X+xmuKy8R2ARk1+A_uQpS+Mnf71MYpBKzg@mail.gmail.com>
	<31790.1545097237@sss.pgh.pa.us>
	<CAMqTPq=4Qp80Qt11DdHjjzM4ksp7O0wTmDQexSUbo2sEoTk+hQ@mail.gmail.com>

>>>>> "Vladimir" == Vladimir Ryabtsev <greatvovan@gmail.com> writes:

 Vladimir> I can't believe it.
 Vladimir> I see some recommendations in Internet to do like this

well, 90% of what you read on the Internet is wrong.

 Vladimir> Did it really work in 2011? Are you saying they broke it?
 Vladimir> It's a shame...

The method in that SO link does work, it's just slow. The workaround is
to do it like this instead:

delete from mytable
 where ctid = any (array(select ctid from mytable
                          where ...
                          order by ...
                          limit 1000));

But of course that's still an ugly hack.

-- 
Andrew (irc:RhodiumToad)




view thread (11+ messages)  latest in thread

Message-ID: <87bm5hwxy2.fsf@news-spur.riddles.org.uk>
Permalink:  ../87bm5hwxy2.fsf@news-spur.riddles.org.uk/
Also on:    postgresql.org/message-id/87bm5hwxy2.fsf@news-spur.riddles.org.uk

 · 

reply

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 using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: andrew@tao11.riddles.org.uk, greatvovan@gmail.com, tgl@sss.pgh.pa.us, pgsql-performance@lists.postgresql.org
  Subject: Re: Why Postgres doesn't use TID scan?
  In-Reply-To: <87bm5hwxy2.fsf@news-spur.riddles.org.uk>

* 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