Re: update from 13 to16

2023-09-15 Thread Adrian Klaver
On 9/15/23 9:55 AM, Martin Mueller wrote: I am thinking of upgrading from version 13 to version 16. I think I can do this by leaving the data alone and just replacing the software.  My data are extremely simple and consist of several hundred No you can't. You will need to either use pg_up

update from 13 to16

2023-09-15 Thread Martin Mueller
I am thinking of upgrading from version 13 to version 16. I think I can do this by leaving the data alone and just replacing the software. My data are extremely simple and consist of several hundred tables, some with close to ten million records. But their structure is simple. I access the

Re: Access plan selection logic PG9.2 -> PG14

2023-09-15 Thread David Rowley
On Fri, 15 Sept 2023 at 21:13, Ryo Yamaji (Fujitsu) wrote: > The following example shows a table with 1 million tuples: > * The cost of using PK was higher than the cost of using user index. > * It was faster to use PK. > > Index Scan using tbl_ix1 on tbl (cost=0.43..0.67 rows=1 width=61) (actua

RE: Access plan selection logic PG9.2 -> PG14

2023-09-15 Thread Ryo Yamaji (Fujitsu)
on Fri, 15 Sept 2023 at 0:00, Adrian Klaver wrote: > Why not just run ANALYZE on the new 14.7 instance? The statistics were manually updated to fix the access plan. I was trying to see if I could fix the access plan in a similar way in 9.2 -> 14.7. I probably will run ANALYZE soon because I hav

RE: Access plan selection logic PG9.2 -> PG14

2023-09-15 Thread Ryo Yamaji (Fujitsu)
on Thu, 14 Sept 2023 at 23:43, David Rowley wrote: > This likely is due to the query planner not giving any preference to the > index that allows more quals to go into the index condition. Once the > selectivity estimate gets as low as 1 row then the costs between each index > don't vary very