Datenbank Index für tbl_prestudent und prestudentstatus hinzugefügt

This commit is contained in:
oesi
2017-02-02 13:58:13 +01:00
parent dc494a3d45
commit bf5120a2a9
+19
View File
@@ -1483,6 +1483,25 @@ if($result = $db->db_query("SELECT data_type FROM information_schema.columns WHE
}
}
// Index fuer prestudent und prestudentstatus
if($result = $db->db_query("SELECT * FROM pg_class WHERE relname='idx_prestudent_person'"))
{
if($db->db_num_rows($result)==0)
{
$qry = "
CREATE INDEX idx_prestudent_person ON public.tbl_prestudent USING btree (person_id);
CREATE INDEX idx_prestudentstatus_prestudent ON public.tbl_prestudentstatus USING btree (prestudent_id);
";
if(!$db->db_query($qry))
echo '<strong>Indizes: '.$db->db_last_error().'</strong><br>';
else
echo 'Diverse Indizes fuer Prestudent und Prestudentstatus hinzugefuegt';
}
}
// *** Pruefung und hinzufuegen der neuen Attribute und Tabellen
echo '<H2>Pruefe Tabellen und Attribute!</H2>';