Query optimization

The whole system is hard to describe here
what im trying to do is optimizing a couple of query called hundreds time per page access