TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Adding Interval Sets to Redis

23 点作者 justinmares将近 12 年前

2 条评论

joevandyk将近 12 年前
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;
mmastrac将近 12 年前
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 未加载