gregrs-uk / python-fhrs-osm

Python tools and Leaflet maps for downloading, comparing and visualising Food Hygiene Rating Scheme (FHRS) and OpenStreetMap data
http://gregrs.dev.openstreetmap.org/fhrs/
GNU General Public License v3.0
8 stars 2 forks source link

Investigate whether INSERTs are quicker if foreign keys have indexes #26

Closed gregrs-uk closed 7 years ago

gregrs-uk commented 7 years ago

Not required.

"A foreign key must reference columns that either are a primary key or form a unique constraint. This means that the referenced columns always have an index (the one underlying the primary key or unique constraint); so checks on whether a referencing row has a match will be efficient."

https://www.postgresql.org/docs/current/static/ddl-constraints.html