By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
Help with an interesting Postgres question: Why isn't an Index Only Scan used on a partition accessed via the parent table?.
CREATE EXTENSION
postgis_full_version |
---|
POSTGIS="3.4.0 0874ea3" [EXTENSION] PGSQL="160" GEOS="3.11.1-CAPI-1.17.1" PROJ="9.1.1 NETWORK_ENABLED=OFF URL_ENDPOINT=https://cdn.proj.org USER_WRITABLE_DIRECTORY=/tmp/proj DATABASE_PATH=/usr/share/proj/proj.db" LIBXML="2.9.14" LIBJSON="0.16" LIBPROTOBUF="1.4.1" WAGYU="0.5.0 (Internal)" |
SELECT 1
CREATE TABLE
id | longitude | latitude |
---|---|---|
1 | 0 | 0 |
2 | 2 | 1 |
3 | 3 | 2 |
4 | 4 | 3 |
INSERT 0 4
CREATE TABLE
id | in_base_station | out_base_station | link_purpose | in_address_geo_x | in_address_geo_y | geom |
---|---|---|---|---|---|---|
1 | 1 | 2 | backhaul | null | null | null |
2 | 2 | 3 | backhaul | null | null | null |
3 | 3 | 4 | backhaul | null | null | null |
INSERT 0 3
id | in_base_station | out_base_station | link_purpose | st_astext |
---|---|---|---|---|
1 | 1 | 2 | backhaul | LINESTRING(2 1,0 0) |
2 | 2 | 3 | backhaul | LINESTRING(3 2,2 1) |
3 | 3 | 4 | backhaul | LINESTRING(4 3,3 2) |
UPDATE 3