7 Mins is one hell of a query time. A few thoughts occur
- Which DBD ?
- Could your data be re-organised/rationalised in such a way that there were fewer complex joins?
- Could you re-organise your data so that you are only using one prinary key on each table.
MySQL in particualr is faster if smaller queries are agregated than it is if asked to make complex JOINs (at least it was 5 years ago when last I used it).