Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Brett Parker
On 18 Jul 18:28, Dmitry Gladkov wrote: > I like the idea, but I don't like the approach, it should be a > subclass of PositiveIntegerField, as it is an unsigned int on DB > level. Also, I agree with Łukasz that it should support both IPv6 and > IPv4. IPAddressField appears to be v4 only for

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Dmitry Gladkov
I like the idea, but I don't like the approach, it should be a subclass of PositiveIntegerField, as it is an unsigned int on DB level. Also, I agree with Łukasz that it should support both IPv6 and IPv4. -- Best wishes, Dmitry Gladkov, mailto:dmitry.glad...@gmail.com +380 91 303-37-46 On

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Javier Guerra Giraldez
On Mon, Jul 18, 2011 at 10:13 AM, Javier Guerra Giraldez wrote: > On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] > wrote: >> It stores the IP address in integer form, meaning the lookups on large >> tables are much

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Or maybe you were talking about hash tables in MySQL. Either way, you're right that this would probably need some benchmarks before being approved for the core. @django-developers, if I was to provide some benchmarks, would this possibly be considered for the core? Cal On Mon, Jul 18, 2011 at

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Sorry, I should have been a little more specific. I meant faster lookups in terms of database index, such as MySQL with InnoDB. Cal On Mon, Jul 18, 2011 at 4:13 PM, Javier Guerra Giraldez wrote: > On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] >

Re: Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Javier Guerra Giraldez
On Mon, Jul 18, 2011 at 9:56 AM, Cal Leeming [Simplicity Media Ltd] wrote: > It stores the IP address in integer form, meaning the lookups on large > tables are much faster: are they?hashtables shouldn't be too sensitive to key size, as long as the

Storing IP address as integer within database to remove need for full text search

2011-07-18 Thread Cal Leeming [Simplicity Media Ltd]
Hi, I have created a ModelField called RealIPAddressField. It stores the IP address in integer form, meaning the lookups on large tables are much faster: http://djangosnippets.org/snippets/2493/ @django-developers - Do you think there is any possibility of this getting included into the core?