I'm struggling with this at the moment. Any tips to make JOINs faster?
And a question for any postgres people: say I have two distinct databases, but now need to join across them. What's best practice here?
And a question for any postgres people: say I have two distinct databases, but now need to join across them. What's best practice here?
If you use `SET enable_nestloop=off`, this will disable them for that session and use alternative strategies (like hash or merge join) which might be faster.
[0] https://www.postgresql.org/docs/current/runtime-config-query...
[1] https://www.splitgraph.com/docs/large-datasets/layered-query...
EDIT: You've probably already tried that if you're following the docs, since they recommend it -- https://www.postgresql.org/docs/current/rules-materializedvi...