Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
Facebook
Downloads
Home
>
mailing lists
Re: Why Postgres doesn't use TID scan? - Mailing list pgsql-performance
From
Vladimir Ryabtsev
Subject
Re: Why Postgres doesn't use TID scan?
Date
December 19, 2018
23:22:03
Msg-id
CAMqTPq=Pu=gS6bg2BqvZU5D=Vj4Ef1qC8wvNDEbmoMUQ7T_m6A@mail.gmail.com
Whole thread
Raw
In response to
Re: Why Postgres doesn't use TID scan?
(Andrew Gierth <andrew@tao11.riddles.org.uk>)
Responses
Re: Why Postgres doesn't use TID scan?
List
pgsql-performance
Tree view
> The workaround is to do it like this instead:
Strange, I tried to do like this, but the first thing came into my mind was
array_agg()
not
array()
:
delete from log
where ctid = any(
select array_agg(ctid) from (
select ctid from log
where timestamp < now() at time zone 'pst' - interval '2 month'
limit 10
) v);
This query complained like this:
ERROR: operator does not exist: tid = tid[]
LINE 2: where ctid = any(
^
HINT: No operator matches the given name and argument type(s). You might need to add explicit type casts.
Which is strange because both
array(select ...)
and
select array_agg() ...
return the same datatype
ctid[]
.
> But of course that's still an ugly hack.
Come on... Due to declarative nature of SQL developers sometimes need to write much dirtier and uglier hacks.
This one is just a fluffy hacky.
--
Vlad
pgsql-performance
by date:
Previous
From:
Andrew Gierth
Date:
19 December 2018, 14:41:27
Subject:
Re: Why Postgres doesn't use TID scan?
Next
From:
Andrew Gierth
Date:
20 December 2018, 01:23:15
Subject:
Re: Why Postgres doesn't use TID scan?
Есть вопросы? Напишите нам!
Соглашаюсь с условиями обработки персональных данных
I confirm that I have read and accepted PostgresPro’s
Privacy Policy
.
I agree to get Postgres Pro discount offers and other marketing communications.
✖
×
×
Everywhere
Documentation
Mailing list
List:
all lists
pgsql-general
pgsql-hackers
buildfarm-members
pgadmin-hackers
pgadmin-support
pgsql-admin
pgsql-advocacy
pgsql-announce
pgsql-benchmarks
pgsql-bugs
pgsql-chat
pgsql-cluster-hackers
pgsql-committers
pgsql-cygwin
pgsql-docs
pgsql-hackers-pitr
pgsql-hackers-win32
pgsql-interfaces
pgsql-jdbc
pgsql-jobs
pgsql-novice
pgsql-odbc
pgsql-patches
pgsql-performance
pgsql-php
pgsql-pkg-debian
pgsql-pkg-yum
pgsql-ports
pgsql-rrreviewers
pgsql-ru-general
pgsql-sql
pgsql-students
pgsql-testers
pgsql-translators
pgsql-www
psycopg
Period
anytime
within last day
within last week
within last month
within last 6 months
within last year
Sort by
date
reverse date
rank
Services
24×7×365 Technical Support
Migration to PostgreSQL
High Availability Deployment
Database Audit
Remote DBA for PostgreSQL
Products
Postgres Pro Enterprise
Postgres Pro Standard
Cloud Solutions
Postgres Extensions
Resources
Blog
Documentation
Webinars
Videos
Presentations
Community
Events
Training Courses
Books
Demo Database
Mailing List Archives
About
Leadership team
Partners
Customers
In the News
Press Releases
Press Info
By continuing to browse this website, you agree to the use of cookies. Go to
Privacy Policy
.
I accept cookies