Preparing to Optimize
Before you make any changes to your Elixir code to speed things up, remember that optimizing Ecto begins with optimizing your database. If your tables are missing critical indexes, or you’re having to perform excessive numbers of joins due to a suboptimal table setup, there’s not much that Ecto can do to help. Database optimization is a much bigger topic than we can cover here, but the documentation for your database is good place to start learning about how to get your data into top shape.
You’ll also want to make sure that you know exactly where your application is slow. You might think you have a good idea, but unless you’ve looked at some metrics, you won’t know for certain. Ecto’s built-in adapters use the Telemetry ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access