Re:Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-18 Thread gzh
Dear Adrian, I appreciate your reply. Your reply gave me a new idea, it should not be the problem that the lower() function causes the unique index to fail. I checked the postgresql.conf file and found that shared_buffers, work_mem and maintenance_work_mem are default value, but in the pos

Re:Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-18 Thread gzh
Dear Adrian, Thanks for your reply. >Did you run ANALYZE on the 12.5 server after restoring the data to it? No, I did not run ANALYZE on the 12.5 server after restoring the data. When I change the select clause like this ( crew_base.crewid → count(*) ), I can retrieve the number of data r

Re:Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-18 Thread gzh
Dear David, Thanks for your reply. >In addition to that, I couldn't help notice that the quoted SQL does >not seem to belong to the explain. The EXPLAIN has a Limit node, but >the query does not. I'm assuming this isn't due to the relations being >views since we don't pull up subqueries with a L

Re:Re: Different execution plan between PostgreSQL 8.2 and 12.5

2022-08-18 Thread gzh
Dear Tom, Thanks for your reply. Please refer to the information below: PostgreSQL 8.2 [root@PostgreSQL8 ~]# cat /etc/redhat-release CentOS release 6.6 (Final) [root@PostgreSQL8 ~]# locale | grep LANG LANG=ja_JP.UTF-8 PostgreSQL 12.5 [root@Postgr