以ä¸ã®ãããªãã¿ã´ã©ã¹ã®å®çã使ã£ãæå®ããçµåº¦ç·¯åº¦ã«æãè¿ããã¼ã¿ãåå¾ããSQLã¯çµæ§ãããã¡ã§ãããCPUè² è·ãé«ãå¹çãæªãã®ã§MySQLã«æ¨æºæè¼ã¨ãªã£ã空éæ å ±(geometry)ã使ã£ã¦ã¿ããã¨ã«ãã¾ãã SELECT * FROM loc ORDER BY power(abs(latitude - 緯度 ), 2) + power(abs(longitude - 緯度 ), 2) LIMIT 1 MySQLã®ç©ºéæ å ±(geometry)æ©è½ã¯PostGIS(Postgresã«ã¹ã¿ãã¤ãº)ã«æ¯ã¹ãã¨è²§å¼±ãªã®ã§ããã®çºã®å·¥å¤«ãè¡ãã¾ããä¾ãã°ããã®ã¨ããã®ã¾ã¾ã ã¨éã«SQLãé ããªãã¾ãã ã¾ãã¯ããã¼ãã«å®ç¾©ãã é常ã®ãã¼ãã« CREATE TABLE IF NOT EXISTS `loc` ( `loc_id` int(11) NOT NULL auto_incremen
{{#tags}}- {{label}}
{{/tags}}