[erlang-questions] measuring OS context switches

Yariv Sadan <>
Wed Sep 20 18:21:08 CEST 2006

> Ke Han, I will soon switch most ErlyDB calls to prepared statements.
> This should give you a big performance boost over Rails, because
> ActiveRecord doesn't use prepared statements at all AFAIK. Without
> prepared statements, MySQL has to parse each query and then plan its
> execution, which is quite expensive. Prepared statements alone should
> give you a big scalability advantage because the database is often one
> of the main bottlenecks for a webapp.

Update: it has been brought to my attention that sometimes prepared
statements don't give you a real performance advantage, and sometimes
even a disadvantage, because they don't use the query cache and
because their execution planning is weaker than non-prepared
statements (at least in MySQL). Given the uncertainty surrounding this
issue, I will make prepared statements optional.


More information about the erlang-questions mailing list