It depends on the requirement of the web applications and the purpose of using the AQAdvanced Queueing. i
I think that there are alternatives such as comparing the timestamp which starts the query and hence check the priority of the transaction query to be executed first.