sql - Inner joins involving three tables -
i have select statement has 3 inner joins involving 2 tables. apart creating indexes on columns referenced in on , clauses, there other things can optimize joins, in rewriting query?
select ... my_table t1 inner join my_table t2 on t2.id = t1.id inner join other_table t3 on t2.id = t3.id ...
you can tune postgresql config, vacuum analize , general optimizations.
if not enough , can spend few days may write code create materialized view described in postgresql wiki.
Comments
Post a Comment