<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Locate Your Users, Part 1: Intro and Data</title>
	<atom:link href="http://blog.anthonychaves.net/2006/10/03/locate-your-users-part-1-intro-and-data/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.anthonychaves.net/2006/10/03/locate-your-users-part-1-intro-and-data/</link>
	<description>Life is software and jujitsu</description>
	<lastBuildDate>Mon, 01 Feb 2010 17:22:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Dan</title>
		<link>http://blog.anthonychaves.net/2006/10/03/locate-your-users-part-1-intro-and-data/comment-page-1/#comment-8506</link>
		<dc:creator>Dan</dc:creator>
		<pubDate>Thu, 06 Dec 2007 03:53:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.anthonychaves.net/blog/java/2006/10/03/locate-your-users-part-1-intro-and-data/#comment-8506</guid>
		<description>Thanks for the post. =)

In case you&#039;re still delving into this stuff here are some things I found that greatly reduced the query time.

In `blocks` i have start_ip_num and end_ip_num as &quot;int(10) unsigned not null&quot; instead of big ints;

I&#039;ve also got start_ip_num as the primary key, with end_ip_num as a unique key.

loc_id is the same...

Take the query for a melbourne ip address:
select loc_id from blocks where  start_ip_num &gt;= 3405775035 and end_ip_num &lt;= 3405775035

Lookup time went from approx 0.90 seconds to 0.00 seconds.

=)</description>
		<content:encoded><![CDATA[<p>Thanks for the post. =)</p>
<p>In case you&#8217;re still delving into this stuff here are some things I found that greatly reduced the query time.</p>
<p>In `blocks` i have start_ip_num and end_ip_num as &#8220;int(10) unsigned not null&#8221; instead of big ints;</p>
<p>I&#8217;ve also got start_ip_num as the primary key, with end_ip_num as a unique key.</p>
<p>loc_id is the same&#8230;</p>
<p>Take the query for a melbourne ip address:<br />
select loc_id from blocks where  start_ip_num &gt;= 3405775035 and end_ip_num &lt;= 3405775035</p>
<p>Lookup time went from approx 0.90 seconds to 0.00 seconds.</p>
<p>=)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
