i have 13 tables with +- 100 000 records in each, same columns, but if i want search some records by column in all tables it takes +- 30sec... its so long :( if i search in 1 table first refresh takes 2-3sec secong refresh takes 0.3sec thats is good for me but only for one table and i need search and get result from all. so at all i have 1 300 000 records at now and i need some fast search :( any help? ty a lot
public function getTablesAoiData(){
return $this->database->query("SELECT TABLE_NAME as `table` FROM information_schema.TABLES WHERE TABLE_NAME LIKE '%aoiData%'");
}
public function searchBarcode($barcode){
$result = array();
foreach($this->getTablesAoiData() as $key => $value){
$result[$key] = $this->database->query("SELECT * FROM `". $value->table ."` WHERE `Barcode`=" .$barcode)->fetch();
}
return $result;
}