Created
May 23, 2016 11:57
-
-
Save eliank/432b76218a34fc3c94c50f12edfffe4f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some_table_some_index_query AS ( | |
SELECT “some_table”.”id” FROM “some_table” WHERE (some_variable IN (‘some_value’, ‘another_value’, ‘yet_another_value’) AND ((some_date <= ‘2016–05–01’ AND DATE_TRUNC(‘day’, updated_at) <= some_date) | |
) | |
SELECT * FROM “some_table_some_index_query” WHERE (“some_table”.”id” > 123456789) ORDER BY “id” ASC LIMIT 1000; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment