dbern
What should be in an "Ecto in Production" book?
help me finish this thought:
“I bought this ‘Ecto in Production’ book to help me with … and learn more about …”
The book doesn’t exist (yet) but i wonder what it should contain.
Most Liked
BartOtten
For one: A chapter about Ecto query plan cache.
By default Ecto caches query plans in a ETS table. Most times it is nice as now the planning-phase can be skipped saving some valuable time.
However, if the data in tables change the plan might not be optimal anymore and lead to worse results then having no cache.
There is an option to disable or influence the cache. When to set that option would be worth a section.
As this is probably never an issue in a dev environment; it’s perfect for a ‘in production’ book ![]()
Found a blog about it: Elixir and Postgres: A Rarely Mentioned Problem | Lainblog
msimonborg
dbern
wild. thanks for that example; I hadn’t seen that before.
tldr for others, Postgres might cache a query plan that is efficient for the first couple of queries and therefore decide to reuse it too much later when it’s less efficient-- but you can force it to use a custom query plan for each query to avoid this issue.
Popular in Discussions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









