Question 27 Consider the scenario where you have loaded the statistical neighbourhoods of Australia - with names and the
Posted: Mon Jun 06, 2022 6:06 pm
Question 27 Consider the scenario where you have loaded the statistical neighbourhoods of Australia - with names and the exact geometries of their boundaries - into a PostgreSQL database using PostGIS. You also have indexed the spatial attribute. The schema looks as follows: CREATE TABLE Neighbourhoods AS ( area_id INTEGER, VARCHAR (20), area_name boundary GEOMETRY ); CREATE INDEX BoundaryIndex ON Neighbourhoods USING GIST (boundar y); We further frequently run the following spatial join query that combines data from the Neighbourhoods and the Landmarks tables: SELECT L.name FROM Landmarks L, Neighbourhoods N WHERE ST Contains (N. boundary, L.location) AND N.area_id=4711; How is this query affected if we would drop the index BoundaryIndex? 2 pts
The query will run slower because the database has to test now all neighbourhood boundaries rather than to filter them on their indexed bounding boxes first. Without the index, the spatial join query will not work anymore. O The query will run faster because the index will not be needed to be updated too. O There will be no difference, because the query does not use this index.
The query will run slower because the database has to test now all neighbourhood boundaries rather than to filter them on their indexed bounding boxes first. Without the index, the spatial join query will not work anymore. O The query will run faster because the index will not be needed to be updated too. O There will be no difference, because the query does not use this index.