非互換
FUJITSU Enterprise Postgres 14では、intarry拡張の「<@」と「@>」演算子の最適化を対応しないように変更します。
「Seq Scan」以外の最適化処理を通ることができます。
[例]
=# CREATE EXTENSION intarray;
CREATE EXTENSION
=# CREATE TABLE test_int(a int[]);
CREATE TABLE
=# INSERT INTO test_int values (array[73,23,20]);
INSERT 0 1
=# CREATE INDEX text_idx ON test_int USING gist ( a gist__int_ops );
CREATE INDEX
=# SET enable_seqscan=off;
SET
=# EXPLAIN SELECT * FROM test_int WHERE a <@ '{73,23,20}';
QUERY PLAN
--------------------------------------------------------------------------
Index Scan using text_idx on test_int (cost=0.13..8.15 rows=1 width=32)
Index Cond: (a <@ '{73,23,20}'::integer[])
(2 rows)最適化処理を対応せず、「Seq Scan」の処理しか通らないように修正します。
[例]
=# CREATE EXTENSION intarray;
CREATE EXTENSION
=# CREATE TABLE test_int(a int[]);
CREATE TABLE
=# INSERT INTO test_int values (array[73,23,20]);
INSERT 0 1
=# CREATE INDEX text_idx ON test_int USING gist ( a gist__int_ops );
CREATE INDEX
=# SET enable_seqscan=off;
SET
=# EXPLAIN SELECT * FROM test_int WHERE a <@ '{73,23,20}';
QUERY PLAN
-----------------------------------------------------------------------------
Seq Scan on test_int (cost=10000000000.00..10000000001.04 rows=1 width=32)
Filter: (a <@ '{73,23,20}'::integer[])
(2 rows)対処方法
ありません。