October 2008
Intermediate to advanced
352 pages
10h 30m
English
Recast a complicated ActiveRecord query as a simpler query on a view-backed model. Now select the same information out of both, recording the time before and after. Repeat multiple times with each to eliminate the impact of disk and database caches. How does performance compare?
Using the same complex query and view from above, compare the
database plans for each. In postgres, you can get a query plan with
the command explain plan
query.
Write a custom ActiveRecord extension plugin, backed_by_view, that when specified,
disables functions that would attempt to write to the view.
Read now
Unlock full access