1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| $time_start_loading = microtime(true);
$sql = "SELECT
ana_liste.nom_action, ana_marge.suffixe, ana_marge.date_num, STR_TO_DATE(ana_marge.date_date, '%d/%m/%Y'), ana_marge.sens, ana_marge.marge, ana_marge.jrs_posit, ana_marge.ma_jrsp,
ana_tende.dwphase_cac, ana_tende.dwprofil_cac, ana_tende.posbdfg_cac, ana_tende.posd200_cac, ana_tende.posd100_cac, ana_tende.posd050_cac, ana_tende.postdli_cac, ana_tende.poskal_cac, ana_tende.dwpente_cac, ana_tende.dwptcac_max, ana_tende.dwptcac_min, ana_tende.dwphase_act, ana_tende.dwprofil_act, ana_tende.posbdfg_act, ana_tende.posd200_act, ana_tende.posd100_act, ana_tende.posd050_act, ana_tende.postdli_act, ana_tende.poskal_act, ana_tende.dwpente_act, ana_tende.dwptact_max, ana_tende.dwptact_min, ana_tende.ifr_act, ana_tende.ifr_act_max, ana_tende.ifr_act_min
FROM ana_marge
INNER JOIN ana_liste ON ana_marge.suffixe = ana_liste.suffixe
INNER JOIN ana_tende ON ana_marge.suffixe = ana_tende.suffixe
AND ana_marge.date_num = ana_tende.date_num
WHERE ana_marge.sens = 'ACH'
AND ana_marge.ref_cfg = ''
AND SUBSTR(ana_marge.cas,1,1) <> 'S'";
$time_start_connexion = microtime(true);
$db = new PDO('mysql:host=192.168.0.23;dbname=anatec', 'admin', 'admin');
$time_end_connexion = microtime(true);
//envoie de la request
$time_start_request = microtime(true);
$req = $db->query($sql);
$time_end_request = microtime(true);
$db = null;
$time_connexion = $time_end_connexion - $time_start_connexion;
$time_request = $time_end_request - $time_start_request;
echo "connexion time: ".$time_connexion."<br/>";
echo "request time: ".$time_request."<br/>";
$time_end_loading = microtime(true);
$time_loading = $time_end_loading - $time_start_loading;
echo "loading time: ".$time_loading; |
Partager