17 |
my $c_table; |
my $c_table; |
18 |
my $c_count; |
my $c_count; |
19 |
|
|
20 |
|
# bench time |
21 |
|
my $t = time(); |
22 |
|
|
23 |
sub new { |
sub new { |
24 |
my $class = shift; |
my $class = shift; |
25 |
my $self = {}; |
my $self = {}; |
102 |
$index_data = substr($index_data,0,255); |
$index_data = substr($index_data,0,255); |
103 |
my $uc = uc($index_data); |
my $uc = uc($index_data); |
104 |
if (! $c_table->{$field}->{$ident}->{$uc}) { |
if (! $c_table->{$field}->{$ident}->{$uc}) { |
105 |
$sth_cache{$field."insert"}->execute($index_data,$ident,0) || die "cache: $field insert; ".$self->{dbh}->errstr(); |
$sth_cache{$field."insert"}->execute($index_data,$ident,0) || warn "cache: $field insert ($index_data,$ident); ".$self->{dbh}->errstr(); |
106 |
#print stderr "in index: $index_data\n"; |
#print stderr "in index: $index_data\n"; |
107 |
$c_table->{$field}->{$ident}->{$uc} = $index_data; |
$c_table->{$field}->{$ident}->{$uc} = $index_data; |
108 |
$c_count->{$field}->{$ident}->{$uc} = 1; |
$c_count->{$field}->{$ident}->{$uc} = 1; |
194 |
|
|
195 |
foreach my $table (keys %Table) { |
foreach my $table (keys %Table) { |
196 |
# FIX |
# FIX |
197 |
|
print STDERR "last operation took ",time()-$t," seconds...\n"; |
198 |
|
$t=time(); |
199 |
print STDERR "creating ord for $table...\n"; |
print STDERR "creating ord for $table...\n"; |
200 |
create_ord($table); |
create_ord($table); |
201 |
undef $sth_cache{$table."select"}; |
undef $sth_cache{$table."select"}; |