Commit 2c3f20b5 authored by Leo Gordon's avatar Leo Gordon
Browse files

bugfix: GROUP BY now includes a proper prefix of the index

parent b4743e73
......@@ -581,7 +581,7 @@ sub synchronize_AnalysisStats {
$analysisStats->num_required_workers(0);
# ask for analysis_id to force MySQL to use existing index on (analysis_id, status)
my $sql = "SELECT analysis_id, status, count(*) FROM job WHERE analysis_id=? GROUP BY status";
my $sql = "SELECT analysis_id, status, count(*) FROM job WHERE analysis_id=? GROUP BY analysis_id, status";
my $sth = $self->prepare($sql);
$sth->execute($analysisStats->analysis_id);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment