Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Database with views only gets index recommendation #721 #734

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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