Handwritten Text Recognition for manuscripts and early printed texts
pt-query-digest は Perl!!
1.
2.
3.
4. /* lib/Giga/Core/Repository/SeriesComment.pm at line 200 */ SELECT COUNT(*)
FROM `series_comment`
WHERE (`is_public` = '1') AND (`series_id` = ‘10834108156628842496');
+----+-------------+-||-+-------+------------------------------------+
| id | select_type | || | rows | Extra |
+----+-------------+-||-+-------+------------------------------------+
| 1 | SIMPLE | || | 30872 | Using index condition; Using where |
+----+-------------+-||-+-------+------------------------------------+
1 row in set (0.05 sec)
5. /* lib/Giga/Core/Repository/SeriesComment.pm at line 200 */ SELECT COUNT(*)
FROM `series_comment`
WHERE (`series_id` = ‘10834108156628842496') AND (`is_public` = '1')G
/* lib/Giga/Core/Repository/SeriesComment.pm at line 200 */ SELECT COUNT(*)
FROM `series_comment`
WHERE (`is_public` = '1') AND (`series_id` = '10834108156628842496')G
6.
7.
8. sub get_public_comments_count {
args my $class => 'ClassName',
my $series => 'Giga::Core::Model::Series',
;
my $core_db = Giga::DB->new->core;
return $core_db->count(
'series_comment',
'*',
+{
series_id => $series->id,
is_public => 1,
},
);
}
9. my $w = $self->new_condition;
my @w = ref $where eq 'ARRAY' ? @$where : %$where;
while (my ($col, $val) = splice @w, 0, 2) {
$w->add($col => $val);
}
14. #!/usr/bin/env perl
# This program is part of Percona Toolkit: http://www.percona.com/soft
# See "COPYRIGHT, LICENSE, AND WARRANTY" at the end of this file for l
# notices and disclaimers.
use strict;
use warnings FATAL => 'all';
# This tool is "fat-packed": most of its dependent modules are embedde
16. # This tool is "fat-packed": most of its dependent modules are embedded
# in this file. Setting %INC to this file for each module makes Perl aware
# of this so it will not try to load the module from @INC. See the tool's
# documentation for a full list of dependencies.