<div dir="ltr">The executed SQL is very simple, and I executed the command explain (analyze, Buffers, verbose) select <a href="http://a.id">a.id</a> from random_2point_lines a join t1 b on public.st_intersects(a.geom, b.geom);. <br>While printing the planner's data in the PostgreSQL database, I encountered an error message "cache lookup failed for operator family 0."<br>In a PostgreSQL database, it would calculate the time for sequential scans and index scans to choose the one with minimal time consumption. However, in the customer's development database, there was an error encountered while scanning the index, displaying the mentioned error message.<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Regina Obe <<a href="mailto:lr@pcorp.us">lr@pcorp.us</a>> 于2024年2月23日周五 10:23写道:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-1899851361368853557"><div lang="EN-US" style="overflow-wrap: break-word;"><div class="m_-1899851361368853557WordSection1"><p class="MsoNormal">You have an example query where you are seeing this behavior?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><div style="border-top:none;border-right:none;border-bottom:none;border-left:1.5pt solid blue;padding:0in 0in 0in 4pt"><div><div style="border-right:none;border-bottom:none;border-left:none;border-top:1pt solid rgb(225,225,225);padding:3pt 0in 0in"><p class="MsoNormal"><b>From:</b> Dapeng Wang <<a href="mailto:wangdapeng20191008@gmail.com" target="_blank">wangdapeng20191008@gmail.com</a>> <br><b>Sent:</b> Thursday, February 22, 2024 8:57 PM<br><b>To:</b> PostGIS Users Discussion <<a href="mailto:postgis-users@lists.osgeo.org" target="_blank">postgis-users@lists.osgeo.org</a>><br><b>Subject:</b> The intersect function does not utilize indexes<u></u><u></u></p></div></div><p class="MsoNormal"><u></u> <u></u></p><div><p class="MsoNormal">Hello everyone,<u></u><u></u></p><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">I have a client with a database developed on PostgreSQL 12, with both Windows and Linux versions. Everything is normal with the Linux version, but there are anomalies with the Windows version.<br><br>While the Windows database can have the PostGIS extension installed, create indexes, and execute SQL queries correctly, spatial functions do not utilize indexes, such as intersection and containment.<br><br>Here's what I've investigated so far (using the same DDL):<br>On the Windows system, PostgreSQL 12 is installed along with PostGIS versions 3.3.0 to 3.4.1, and everything works fine. Spatial functions can utilize indexes.<br>On the Windows system, the client's developed database is installed with PostGIS versions 3.3.0 to 3.4.1. Queries using the && operator utilize indexes, but spatial functions (such as st_intersects and ST_Contains) do not utilize indexes.<br>Vacuum analyze has been performed, and I've attempted to disable sequential scans and force index scans, but to no avail.<br>Do you have any good suggestions?<u></u><u></u></p></div><div><p class="MsoNormal"><u></u> <u></u></p></div><div><p class="MsoNormal">Thanks,<u></u><u></u></p></div><div><p class="MsoNormal">Dapeng<u></u><u></u></p></div></div></div></div></div></div></blockquote></div>