Skip to content

Instantly share code, notes, and snippets.

@kmoppel
Created January 11, 2017 07:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmoppel/e07042056245ee6d9e0caeed557cfac1 to your computer and use it in GitHub Desktop.
Save kmoppel/e07042056245ee6d9e0caeed557cfac1 to your computer and use it in GitHub Desktop.
-- subqueries
explain select * from t_counter c, lateral (select * from t_joiny j where j.a = c.id) s;
explain select * from t_counter c join lateral (select * from t_joiny j where j.a = c.id) s on true;
-- functions
explain select * from t_counter, lateral (select * from generate_series(1, id)) s;
explain select * from t_counter, generate_series(1, id) s;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment