Re: Table scan on 15.2

2023-03-15 Thread Arthur Ramsey
What's strange is that there is only 1 non-unique value in the column. >

Re: Table scan on 15.2

2023-03-15 Thread Arthur Ramsey
That worked, thanks. I was trying to find how to do that in pgsql.

Re: Table scan on 15.2

2023-03-15 Thread Arthur Ramsey
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[]))

Re: Table scan on 15.2

2023-03-15 Thread Arthur Ramsey
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 50

Table scan on 15.2

2023-03-15 Thread Arthur Ramsey
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

Re: Failed upgrade from 12.11 to 14.4

2023-03-02 Thread Arthur Ramsey
I was unaware this was a user created view. Dropping the view did the trick thanks for the help. On Wed, Mar 1, 2023 at 1:54 PM Tom Lane wrote: > Arthur Ramsey writes: > > "Database instance is in a state that cannot be upgraded: pg_restore: > from > > TOC entry 1

Failed upgrade from 12.11 to 14.4

2023-03-01 Thread Arthur Ramsey
"Database instance is in a state that cannot be upgraded: pg_restore: from TOC entry 1264; 1259 32392758 VIEW pg_stat_activity_allusers master pg_restore: error: could not execute query: ERROR: column reference "query" is ambiguous LINE 32: "get_sa"."query" ^ Command was: -- For binary upgrade, mus

Sequential scan faster than index

2023-02-21 Thread Arthur Ramsey
I'm trying to figure out why a sequential scan is out performing. I've tried psql 13.7, psql14.6 and REINDEX. The REINDEX didn't help. This is on an RDS instance that's a db.m5.large (2 * vCPU, 8 GB memory) with 200 storage on io1 with 1 provisioned IOPS. I restarted the RDS instance in bet