This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- GEOIP IN POSTGRESQL | |
| -- | |
| -- We use two approaches. First using PostgreSQL inet and cidr types and indexing (PostgreSQL 9.4 and later), | |
| -- and then using ip4r (https://github.com/RhodiumToad/ip4r). | |
| -- The performance of ip4r indexes is significantly better than PostgreSQL's own index. | |
| -- An operation that took 42s using ip4r took 47 minutes using PostgreSQL's cidr index. | |
| -- |