Re: BRIN index on timestamptz

2021-04-26 Thread Peter J. Holzer
On 2021-04-26 17:23:49 +0530, Mohan Radhakrishnan wrote: > Isn't a btree subject to these effects ? So when I update ENUMS for each > timestamptz, btree indexes are less susceptible > to the effects than BRIN indexes  ? A btree index contains one entry for each record which points to that records.

Re: BRIN index on timestamptz

2021-04-26 Thread Mohan Radhakrishnan
Isn't a btree subject to these effects ? So when I update ENUMS for each timestamptz, btree indexes are less susceptible to the effects than BRIN indexes ? Thanks. On Sat, Apr 24, 2021 at 9:05 PM Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > > Why not use a btree index for the >

Re: BRIN index on timestamptz

2021-04-24 Thread Mohan Radhakrishnan
> Why not use a btree index for the >timestamptz column? There are some capabilities our team lacks. Due to that autovacuum tuning mechanisms isn't considered at all. It may be in the future. I know about basic MVCC though. BRIN was an option as the characteristics you describe match the require

Re: BRIN index on timestamptz

2021-04-24 Thread Michael Lewis
On Sat, Apr 24, 2021, 1:27 AM Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > What's your question exactly? If you have confidence that correlation will > remain high (insert only table, or occasional cluster/repack with cluster > is done), then BRIN can be a good fit. If you do upda

Re: BRIN index on timestamptz

2021-04-23 Thread Michael Lewis
On Fri, Apr 23, 2021, 2:32 AM Mohan Radhakrishnan < radhakrishnan.mo...@gmail.com> wrote: > I execute this on the AWS RDS instance. Is there something in the plan I > should pay attention to ? I notice the Execution Time. > > > " -> Bitmap Index Scan on "testtab_date_brin_idx " (cost=0.00..20.0

Re: BRIN index on timestamptz

2021-04-23 Thread Mohan Radhakrishnan
>a) You need to do ANALYZE, otherwise >there are no statistics the optimizer >could use I execute and analyze. The actual timestamps I have are not random. I will order them chronologically. Thanks On Saturday, April 24, 2021, Tomas Vondra wrote: > > > On 4/23/21 10:31 AM, Mohan Radhakrishnan

Re: BRIN index on timestamptz

2021-04-23 Thread Tomas Vondra
On 4/23/21 10:31 AM, Mohan Radhakrishnan wrote: Hi,          I am planning to use as I search based on timestamptz fields. There are millions of records.I refer https://www.percona.com/blog/2019/07/16/brin-index-for-postgresql-dont-forget-the-benefits

BRIN index on timestamptz

2021-04-23 Thread Mohan Radhakrishnan
Hi, I am planning to use as I search based on timestamptz fields. There are millions of records.I refer https://www.percona.com/blog/2019/07/16/brin-index-for-postgresql-dont-forget-the-benefits I execute this on the AWS RDS instance. Is there something in the plan I should pay attention