Skip to content

Instantly share code, notes, and snippets.

@isopropylcyanide
Last active February 25, 2022 19:30
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 isopropylcyanide/c3f4d10bf7c27259d598136048395c0a to your computer and use it in GitHub Desktop.
Save isopropylcyanide/c3f4d10bf7c27259d598136048395c0a to your computer and use it in GitHub Desktop.
connector-snapshot-override-index.sql
-- myTable has over millions of rows
-- create index on a column first
create index idx_updated_at on `myDatabase.myTable`(updated_at);
-- now the column can be safely used as an override
-- "snapshot.select.statement.overrides.myDatabase.myTable":
-- "select * from `myDatabase.myTable` where updated_at > \"2021-02-01 18:00:00\"",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment