What's strange is that there is only 1 non-unique value in the column.
>
That worked, thanks. I was trying to find how to do that in pgsql.
Arthur Ramsey 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 est
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)
Recheck Cond: (upper((username)::text) = ANY ('{[redacted]'::text[]))
Arthur Ramsey writes:
> I've upgraded from 12.11 to 15.2 and I'm seeing this query now use a
> sequential scan which is taking 500ms instead of < 2ms. If I disable
> sequential scans then it performs as well as 12.11.
What does the EXPLAIN look like with seqscans disabled?
Yes, I forgot to mention I did a REINDEX DATABASE and ANALYZE.
On Wed, Mar 15, 2023 at 10:20 AM Adrian Klaver
wrote:
> On 3/15/23 08:17, Arthur Ramsey wrote:
> > I've upgraded from 12.11 to 15.2 and I'm seeing this query now use a
> > sequential scan which is taking 500ms instead of < 2ms. If I
On 3/15/23 08:17, Arthur Ramsey wrote:
I've upgraded from 12.11 to 15.2 and I'm seeing this query now use a
sequential scan which is taking 500ms instead of < 2ms. If I disable
sequential scans then it performs as well as 12.11.
Did you run ANALYZE on the database/table in the new 15.2 instan
I've upgraded from 12.11 to 15.2 and I'm seeing this query now use a
sequential scan which is taking 500ms instead of < 2ms. If I disable
sequential scans then it performs as well as 12.11.
Schema:
Table "public.t_user"
Column | Typ