Received: from localhost (unknown [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 8B7352E3038 for ; Sat, 12 Jan 2008 02:01:01 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 22253-03 for ; Sat, 12 Jan 2008 02:00:52 -0400 (AST) Received: from smaug.vex.net (smaug.vex.net [208.76.104.132]) by postgresql.org (Postfix) with ESMTP id 915222E2FF1 for ; Sat, 12 Jan 2008 02:00:53 -0400 (AST) Received: from dilbert (dilbert.druid.net [207.35.13.14]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smaug.vex.net (Postfix) with ESMTP id 0B69217065; Sat, 12 Jan 2008 01:00:48 -0500 (EST) Date: Sat, 12 Jan 2008 01:00:48 -0500 From: "D'Arcy J.M. Cain" To: Greg Smith Cc: PostgreSQL Performance Subject: Re: Best way to index IP data? Message-Id: <20080112010048.27678be8.darcy@druid.net> In-Reply-To: References: <36e682920801101541o7626bbddj428617144240c554@mail.gmail.com> <13179.1200064791@sss.pgh.pa.us> <20080111162747.GT5294@mathom.us> <24044.1200082058@sss.pgh.pa.us> <20080111212703.GU5294@mathom.us> <20080111213710.GD8260@alvh.no-ip.org> <20080111220235.GX5294@mathom.us> <20080111222403.GA7527@crankycanuck.ca> <1259C7B1-C948-4326-B827-849C64B61A16@blighty.com> <20080111230055.GB7618@crankycanuck.ca> <00045B34-A238-46B9-8641-C0A40C5CCCE5@blighty.com> X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.3; x86_64--netbsd) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200801/104 X-Sequence-Number: 28343 On Fri, 11 Jan 2008 21:56:38 -0500 (EST) Greg Smith wrote: > On Fri, 11 Jan 2008, Steve Atkins wrote: > > > You may well need netmasks to configure your interface, but there's > > absolutely no need for them to identify an IP endpoint, which is all you > > need to identify the destination the packet is going to, and that is the > > most common use of IP addresses. > > Technically you can't ever send a packet unless you know both the endpoint > and your local netmask. As the sender, you're obligated to determine if > the destination is on your local LAN (in which case you send it there) or > if it goes to the gateway. That's similar to a routing decision, but it's > not quite--if you don't have to look in a routing table, it's not actually > part of routing. Not sure what your point is here. Sure, you need the netmask but not of every IP address you send to, only for the IP/network that you are on. That's a grand total of one netmask per interface that you need to know. And you don't store it in your database. -- D'Arcy J.M. Cain | Democracy is three wolves http://www.druid.net/darcy/ | and a sheep voting on +1 416 425 1212 (DoD#0082) (eNTP) | what's for dinner.