==================
Як iнтерiсно. Постгрескл версии 11:
A case similar to filter conditions occurs with “lossy” index scans. For example, consider this search for polygons containing a specific point:
EXPLAIN ANALYZE SELECT * FROM polygon_tbl WHERE f1 @> polygon
'(0.5,2.0)';
The planner thinks (quite correctly) that this sample table is too small to bother with an index scan,
so we have a plain sequential scan in which all the rows got rejected by the filter condition. But if we
force an index scan to be used, we see:
SET enable_seqscan TO off;
EXPLAIN ANALYZE SELECT * FROM polygon_tbl WHERE f1 @> polygon
'(0.5,2.0)';
Here we can see that the index returned one candidate row, which was then rejected by a recheck
of the index condition. This happens because a GiST index is “lossy” for polygon containment tests:
it actually returns the rows with polygons that overlap the target, and then we have to do the exact
containment test on those rows.
То есть, если пг_ каким-то образом при выполнении плана отключится seq_scan, то он может выдать неправильный результат при работе с геоданными хранящимися в GiST индексе.
Хорошо, что просто так его нельзя отключить