mirror of
https://github.com/google/nomulus
synced 2026-05-21 23:31:51 +00:00
* Revise Host index on inet_addresses The index on the 'inet_addresses array column should be of gin or gist type, which index individual array elements. We use gin for now since host updates are not often, and gin has better accuracy. Since flyway script V108__... has not been deployed, we edit the file in place instead of adding a new script. This will be followed up with a modified query that can take advantage of the gin index. Until then we don't expect to see performance improvement. The suspected bottlenect query in the whois path is: select * from "Host" where 'non-ip-string' = any(inet_address) and deletion_time < now(); It needs to be revised into: select * from "Host" where array['non-ip-string'] <@ inet_address and deletion_time < now(); The combined change reduces the query time from 90ms to 30ms in Sandbox, and from 150ms to 40ms in production. It is unclear if this solves all problem with whois latency.