Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save eliank/bc7bd04e0db5e6e0338cec0da47efbb7 to your computer and use it in GitHub Desktop.
Save eliank/bc7bd04e0db5e6e0338cec0da47efbb7 to your computer and use it in GitHub Desktop.
moneybird_app=> EXPLAIN ANALYZE 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) AND (“some_table”.”id” > 133891263636178370) ORDER BY “some_table”.”id” ASC LIMIT 1000;
 — REMOVED DETAILS
Index Scan using some_table_pkey on some_table (cost=0.43..1295055.42 rows=75277 width=8) (actual time=0.771..35490.356 rows=1000 loops=1)
 — REMOVED DETAILS
Planning time: 2.049 ms
Execution time: 35521.964 ms
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment