it is possible that the execute bit of a query (select) with 2 fields and the same with 8 fields (1000 records), the page load times with datagrid (url: file.php) range from 3 seconds to 30 seconds?
$sql = "SELECT idCliente,cognome,nome,codFisc,via,tel,telCell,note
FROM clienti ORDER BY idCliente DESC ";
try {
$stmt = $DB->prepare($sql);
$stmt->execute();
$results = $stmt->fetchAll();
} catch (Exception $ex) {
printErrorMessage($ex->getMessage());
}
$returnArray = array();
if (count($results) > 0) {
foreach ($results as $rs) {
$returnArray[] = $rs;
}
}
echo json_encode($returnArray);