Skip to content
Snippets Groups Projects
Commit 96e8937f authored by VONDERSCHER William's avatar VONDERSCHER William
Browse files

permiere question des indexes

parent 00f253ad
No related branches found
No related tags found
No related merge requests found
......@@ -45,4 +45,9 @@ echo 'Cache de requete mysql, tous les jeux: ';
echo $c->allGame();
echo 'µs .<br>';
echo'index : <br>';
echo 'jeux qui commencent par Ma :'.$c->td3_index('Ma').'<br>';
echo 'jeux qui commencent par Ac :'.$c->td3_index('Ac').'<br>';
echo 'jeux qui commencent par Pr :'.$c->td3_index('Pr');
echo ("</body> </html>");
\ No newline at end of file
......@@ -279,6 +279,14 @@ class ControleurScript
return Company::where('name','like', '%Sony%')->get()->games();
}
public function td3_index($val){
$time_start = microtime(true);
Game::where('name', 'like', $val.'%')->get();
$time_end = microtime(true);
$time = $time_end - $time_start;
return $time;
}
public function allGame(){
$time_start = microtime(true);
Game::get();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment