Index the two shapes geolite_locations is actually queried by

Performancekamo-shared-library
Ya
21 Agosti 2026, 01:36 UTC
Mwandishi
Kamo
Ahadi ya
256ac46

Country alone was the only index on an 80,429-row table, and neither real query used it well. Measured on production: city resolution (country + subdivision), US + CA: index-scanned all 18,870 US rows to keep 984 — 138 ms country picker (SELECT DISTINCT country_iso_code, country_name): sequential scan of all 80,429 rows to return 251 — 168 ms (country_iso_code, subdivision1_iso_code) seeks straight to the state's rows; (country_iso_code, country_name) lets the picker resolve without touching the table. Extra indexes are close to free here: this table is replaced wholesale by the weekly GeoLite sync and never written on a request path, so there is no write amplification to trade against.

Mabadiliko yote

Je, unaona nini kuhusu usafiri?

Kila moja ya hizi updates ardhi katika nafasi yako ya kazi moja kwa moja. Kuanza bure na kuangalia kukua wiki baada ya wiki.

Kuwa Huru MileleMtazamo wa bei