Re: When are largobject records TOASTed into pg_toast_2613?

2020-08-29 Thread Thomas Boussekey
Hello all, You can find at the end of this email, a new version of the script that I use to remove the TOAST table on pg_largobject catalog table. I fixed some typos and wrong synthaxes that I had typed too quickly in my first version. Thanks to this script, I can migrate successfully the Postgre

Re: Performance of "distinct with limit"

2020-08-29 Thread Klaudie Willis
Thanks for your insight Jeff. Interesting read! K Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Saturday, August 29, 2020 6:23 PM, Jeff Janes wrote: > On Fri, Aug 28, 2020 at 8:34 AM Klaudie Willis > wrote: > >> No index on n, no. Index might

Re: Performance of "distinct with limit"

2020-08-29 Thread Jeff Janes
On Fri, Aug 28, 2020 at 8:34 AM Klaudie Willis < klaudie.wil...@protonmail.com> wrote: > No index on n, no. Index might solve it yes, but it seems to me such a > trivial optimization even without. Obviously it is not. > > QUERY > PLAN > | > > --

Re: How to properly query lots of rows based on timestamps?

2020-08-29 Thread Tom Lane
=?utf-8?Q?Thorsten_Sch=C3=B6ning?= writes: > I have a table containing around 95 million rows, pretty much only > storing a timestamp and further IDs of related tables containing the > actual data in the end. >> CREATE TABLE clt_rec >> ( >> id BIGSERIAL NOT NULL, >> oms_rec BIGINT NOT NULL,

Re: How to properly query lots of rows based on timestamps?

2020-08-29 Thread Alban Hertroys
> On 29 Aug 2020, at 10:24, Thorsten Schöning wrote: > > Hi all, > > I have a table containing around 95 million rows, pretty much only > storing a timestamp and further IDs of related tables containing the > actual data in the end. > >> CREATE TABLE clt_rec >> ( >> id BIGSERIAL NOT NULL,

How to properly query lots of rows based on timestamps?

2020-08-29 Thread Thorsten Schöning
Hi all, I have a table containing around 95 million rows, pretty much only storing a timestamp and further IDs of related tables containing the actual data in the end. > CREATE TABLE clt_rec > ( > id BIGSERIAL NOT NULL, > oms_rec BIGINT NOT NULL, > captured_at TIMESTAMP(6) WITH TIME