From: Eric Bollengier Date: Wed, 7 Apr 2010 15:23:54 +0000 (+0200) Subject: update accurate test X-Git-Tag: Release-5.2.1~125 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f8db7b6cce9f5af99336e299550f58cb1a18acb6;p=bacula%2Fdocs update accurate test --- diff --git a/docs/techlogs/accurate-test.ods b/docs/techlogs/accurate-test.ods index 86439c28..4a6317a8 100644 Binary files a/docs/techlogs/accurate-test.ods and b/docs/techlogs/accurate-test.ods differ diff --git a/docs/techlogs/accurate-test.pl b/docs/techlogs/accurate-test.pl index 61ee1fe4..d4397896 100755 --- a/docs/techlogs/accurate-test.pl +++ b/docs/techlogs/accurate-test.pl @@ -197,6 +197,34 @@ WHERE FileIndex > 0 ORDER BY Temp.JobId, FileIndex ASC print "Big select takes ", scalar(time) - $begin, "secs for $ret->[0] records\n"; print STDERR "new|$ret->[0]|$nb|", (scalar(time) - $begin),"\n"; + print "Doing Accurate query...\n"; + } + foreach my $i (1..4) { + my $begin = time; + my $ret = $dbh->selectrow_arrayref("SELECT count(1) from ( +SELECT Path.Path, Filename.Name, Temp.FileIndex, Temp.JobId, LStat, MD5 +FROM ( + SELECT FileId, Job.JobId AS JobId, FileIndex, File.PathId AS PathId, + File.FilenameId AS FilenameId, LStat, MD5 + FROM Job, File, + ( SELECT MAX(JobTDate) AS JobTDate, PathId, FilenameId + FROM File JOIN Job USING (JobId) WHERE File.JobId IN ($jobid) + GROUP BY PathId, FilenameId + ) AS T1 + WHERE Job.JobId IN ($jobid) + AND T1.JobTDate = Job.JobTDate + AND Job.JobId = File.JobId + AND T1.PathId = File.PathId + AND T1.FilenameId = File.FilenameId + ) AS Temp + JOIN Filename ON (Filename.FilenameId = Temp.FilenameId) + JOIN Path ON (Path.PathId = Temp.PathId) +WHERE FileIndex > 0 ORDER BY Temp.JobId, FileIndex ASC +) as a") or die "Can't do query $DBI::errstr"; + + print "Big select without base takes ", scalar(time) - $begin, "secs for $ret->[0] records\n"; + print STDERR + "base|$ret->[0]|$nb|", (scalar(time) - $begin),"\n"; } if (0) { foreach my $i (1..4) {