source: trunk/dnsbl/addparents.sql@ 64

Last change on this file since 64 was 32, checked in by Kris Deugau, 13 years ago

/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 size: 705 bytes
Line 
1-- Add parent column to blocks and iplist tables, add ipcount column to blocks table
2-- Note you will need to run setparents.pl after applying this to the
3-- database in order to properly populate the new columns.
4
5alter table blocks add column parent cidr;
6create index blocks_parent_index on blocks (parent);
7update blocks set parent='0/0';
8alter table blocks alter column parent set not null;
9
10alter table blocks add column ipcount integer;
11update blocks set ipcount=0;
12alter table blocks alter column ipcount set not null;
13
14alter table iplist add column parent cidr;
15create index ip_parent_index on iplist (parent);
16update iplist set parent='0/0';
17alter table iplist alter column parent set not null;
Note: See TracBrowser for help on using the repository browser.