Skip to content

Commit

Permalink
Merge pull request #734 from jmrenouard/master
Browse files Browse the repository at this point in the history
Bug: Database with views only gets index recommendation #721
  • Loading branch information
jmrenouard committed Sep 26, 2023
2 parents 572f342 + da0a35d commit 8de551c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mysqltuner.pl
Original file line number Diff line number Diff line change
Expand Up @@ -7076,9 +7076,12 @@ sub mysql_indexes {
infoprint " +-- COMMENT : " . $info[5] if defined $info[5];
$found++;
}
badprint "No index found for $dbname database" if $found == 0;
my $nbTables=select_one(
"SELECT count(*) from information_schema.TABLES WHERE TABLE_TYPE ='BASE TABLE' AND TABLE_SCHEMA='$dbname'"
);
badprint "No index found for $dbname database" if $found == 0 and $nbTables>1;
push @generalrec, "Add indexes on tables from $dbname database"
if $found == 0;
if $found == 0 and $nbTables>1;
}
return
unless ( defined( $myvar{'performance_schema'} )
Expand Down

0 comments on commit 8de551c

Please sign in to comment.