Changeset 32 for trunk/dnsbl/browse.cgi


Ignore:
Timestamp:
03/25/11 17:16:38 (13 years ago)
Author:
Kris Deugau
Message:

/trunk/dnsbl

Changeset to improve export speed on DNSBL database. By keeping
IP counts for each block, and directly tracking the parent of
each block and IP, an export taking ~90 seconds can be brought
down under 20.

  • updated initial tabledef SQL
  • Add addparents.sql SQL tabeldef and setparents.pl data update script
  • Tweak reporting of IP since it now requires the parent block(s) so the parent field can be filled in

Also add delist-ip script and Makefile

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dnsbl/browse.cgi

    r25 r32  
    5454my $basesql = "SELECT b.block,o.orgname,b.listme,o.listme,b.comments,o.comments ".
    5555        "FROM blocks b INNER JOIN orgs o ON b.orgid=o.orgid ".
    56         "WHERE b.block <<= ";
     56        "WHERE b.parent = ";
    5757my $sth0 = $dbh->prepare($basesql."'0/0' AND b.level=0 ORDER BY block");
    5858#my $sth0 = $dbh->prepare($basesql."'64/8' AND b.level=0 ORDER BY block");
    5959my $sth1 = $dbh->prepare($basesql."? AND b.level=1 ORDER BY block");
    6060my $sth2 = $dbh->prepare($basesql."? AND b.level=2 ORDER BY block");
    61 my $sthiplist = $dbh->prepare("select * from iplist where ip <<= ? order by ip");
     61my $sthiplist = $dbh->prepare("select * from iplist where parent = ? order by ip");
    6262
    6363my %ipseen;
Note: See TracChangeset for help on using the changeset viewer.