Last change
on this file since 49 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 |
|
---|
5 | alter table blocks add column parent cidr;
|
---|
6 | create index blocks_parent_index on blocks (parent);
|
---|
7 | update blocks set parent='0/0';
|
---|
8 | alter table blocks alter column parent set not null;
|
---|
9 |
|
---|
10 | alter table blocks add column ipcount integer;
|
---|
11 | update blocks set ipcount=0;
|
---|
12 | alter table blocks alter column ipcount set not null;
|
---|
13 |
|
---|
14 | alter table iplist add column parent cidr;
|
---|
15 | create index ip_parent_index on iplist (parent);
|
---|
16 | update iplist set parent='0/0';
|
---|
17 | alter table iplist alter column parent set not null;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.