A novel solution to a big MySQL problem

Monday, February 18, 2008, 12:03 AM
Code by John

Every now and then you come across a blog that is really worth passing along. Jeremy Cole's blog falls squarely in this category. Cole is the kind of MySQL guru I can only dream of being.

I came across his blog while searching for a few different approaches to solving the great issue of blacklisting incoming IP addresses from countries that post a lot of spam into websites. The main problem isn't the database of IPs and countries itself. While large it isn't impossible. It is just cumbersome if your goal is to search for ranges.

Advertisements


The problem comes when you're trying to push through all of those IP addresses quickly to get a fast answer. Cole's solution is novel: form the IPs into polygons and use the MySQL polygon function to determine if an IP falls within the given range. It's pretty cool, when you think about. Speedy, too. That's nice, especially for a blacklisting function, since obviously the whitelisted folks still have to be passed through before they're served any content.

Cole has quite a few other hardcore MySQL guru tips on his website, too. it is worth a further look.


Mail article to a friend

© 2009 Pro Content and Design. All rights reserved.


Tools

Check Google PageRank


Recent articles

  1. WordPress auto-Twitters. Yay. Wonderful.
  2. Could social networking please die already?
  3. Fair use wins big with animated ethnic slur fest
  4. Stop blaming the internet for the death of newspapers
  5. My computer doesn't have a problem! I HAVE ANTI-VIRUS!!
  6. Playing with macro photography
  7. When did GoogleBot get this slow and lame
  8. The non-tech classes you should take in college
  9. Re-familiarizing myself with Visual BASIC .NET
  10. Coping with the USPS outage

Welcome!

Wonder where to start with your web design business?

This blog follows along with my efforts to build and grow a website design business, Pro Content and Design.

The goal of this blog is to fill in blanks that may be empty as you get your business rolling.

This blog, particularly the source code section, is not intended for beginners. If you are not comfortable with databases, Ajax, DOM objects and other advanced methods, I strongly suggest you go take a look over at W3 Schools before even reading -- let alone tinkering with -- any of the code here.

I hope this blog has some value to web designers as they attempt to get their businesses going.

Good luck, and happy reading.

Thank you,
John Crawford
Pro Content and Design

Books


I highly recommend Art of the Start if you have no idea where to start with marketing.

Links

Coding
W3 Schools
IBM's Mastering Ajax Series

Graphic Design
Worth 1000
Stock.XCHNG
Urban Fonts

Website Software
Apache Web Server
SquirrelMail
PHP/Zend

Website Design Issues
Non-Standard Character Guide
Google Trends
Search Engine Optimization Analyzer

Business
Guy Kawasaki's Blog
Seth Godin's Blog
Freakonomics

Computers
NewEgg

My Main Website
Pro Content and Design

Websites I have built
PunxsyPage: local free classifieds website

Farm N Land: low-cost real estate listing website

InvestYoung: semi-defunct finance blog

Groundhog Festival: for the local summer festival

Weather Discovery Center

My Webapps
TV Stations Transmitter Database

Google PageRank Checker

Website where I did the code, database and admin
Tour de Toona: annual bicycle race in Altoona, PA