TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Adding Interval Sets to Redis

23 pointsby justinmaresalmost 12 years ago

2 comments

joevandykalmost 12 years ago
For what it&#x27;s worth, postgresql supports intervals (ranges) as of 9.1. <a href="http://www.postgresql.org/docs/9.2/static/rangetypes.html" rel="nofollow">http:&#x2F;&#x2F;www.postgresql.org&#x2F;docs&#x2F;9.2&#x2F;static&#x2F;rangetypes.html</a><p>There&#x27;s also a fantastic ip4r extension for postgresql that lets you efficiently query IP ranges (which the article says was the motivation for adding interval sets to redis).<p>I use it for storing maxmind&#x27;s IP database to figure out where our visitors come from in SQL queries -- given an IP address, I can find the city. zip code, lat&#x2F;lon, etc. Which lets me easily figure out things like &quot;what percentage of our users that purchased something this year are in this particular UPS shipping zone?&quot;
mmastracalmost 12 years ago
This is a dupe of a post a long time ago, but if you haven&#x27;t read it, it&#x27;s a great read and shows how well-architected Redis is.
评论 #6175207 未加载