Re: Table scan on 15.2 - Mailing list pgsql-general

From Tom Lane
Subject Re: Table scan on 15.2
Date
Msg-id 3340032.1678897087@sss.pgh.pa.us
Whole thread Raw
In response to Re: Table scan on 15.2  (Arthur Ramsey <arthur.ramsey@code42.com>)
Responses Re: Table scan on 15.2  (Arthur Ramsey <arthur.ramsey@code42.com>)
List pgsql-general
Arthur Ramsey <arthur.ramsey@code42.com> writes:
> After a restart and seq disabled for session with no other load (same for
> plan with seq enabled).

>  Bitmap Heap Scan on t_user user0_  (cost=19567.17..58623.03 rows=800678
> width=761) (actual time=0.370..0.702 rows=36 loops=1)

So the problem is that awful rowcount estimate.  (I see that v12's
estimate wasn't exactly spot-on either, but it wasn't so bad as to
push the planner to use a seqscan.)  Hard to form an opinion on the
cause of that when you've redacted all the details of the index
condition, unfortunately.

It could be that increasing the table's statistics target and
re-ANALYZEing would help.

            regards, tom lane



pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: How to behive if I remove password from postgres role
Next
From: Arthur Ramsey
Date:
Subject: Re: Table scan on 15.2