I have virtually the same join query, the difference between my ( >two ) queries being one of the tables on which the join is made. Performance-wise is it better to: 1)rewrite the queries (in one stored procedure ?) OR 2)pass the table on which the join is made as a parameter in a stored procedure (written in plpgsql BTW) and run the query using EXECUTEI have virtually the same join query, the diffe