Making sure that you create the appropriate INDEXES on your database tables is very helpful. In particular, if you are connecting two tables to each other like this:
TABLE_1
id
TABLE_2
id
field_x
field_y
SELECT t1.*, t2.field_x, t2.field_y FROM TABLE_1 t1, TABLE_2 t2
WHERE t2.field_x = t1.id
Then you should make sure that the field 'id' in TABLE_1 and field_x in TABLE_2 are indexed.