Well.. did u look up indexing as an option.. this happens with the system when the stuff aint indexed well.. plus, how many tables are there in the 20 relating tables which have huge volume of data? If there are small tables what you can do is query it.. and create array and change field type of the relating fields to dropdown instead setting relations.
plus .. dont do the same using datatables.. use flexigrid.. if u want to use datatables.. then do serverside pagination so it limits the data / conditions...
if you still facing problem.. thn its time 2 take it personal.. one 2 one
tnks ! i will try to solve this.