Query Optimization: Select only needed columns instead of SELECT * on looped queries

This commit is contained in:
johnnyq
2026-08-06 12:59:43 -04:00
parent 77defcf7d8
commit b8c9d5b4cf
117 changed files with 345 additions and 227 deletions

View File

@@ -25,7 +25,7 @@ if (isset($_GET['credential_id']) && !empty($api_key_decrypt_password)) {
} elseif (!empty($api_key_decrypt_password)) {
// All credentials ("credentials")
$sql = mysqli_query($mysqli, "SELECT * FROM credentials WHERE 1=1 " . apiClientScopeSql('credential_client_id') . " ORDER BY credential_id LIMIT $limit OFFSET $offset");
$sql = mysqli_query($mysqli, "SELECT credential_password, credential_username FROM credentials WHERE 1=1 " . apiClientScopeSql('credential_client_id') . " ORDER BY credential_id LIMIT $limit OFFSET $offset");
}