ma non ti basta aggiungere la where priorita=x quando interroghi la tabella tempi?