Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eliank/8c362cc1fe4816a7a40067c6268779ea to your computer and use it in GitHub Desktop.
Save eliank/8c362cc1fe4816a7a40067c6268779ea to your computer and use it in GitHub Desktop.
CREATE INDEX
CREATE INDEX some_table_some_index ON some_table USING btree (some_variable, some_date) WHERE some_variable IN ('some_value', 'another_value', 'yet_another_value') AND DATE_TRUNC('day', updated_at) <= some_date;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment