I was feeling pretty smug with myself (although I did have a Find_All
to get rid of) until I got to the pagination part. Its great
information about its performance problems, but I’m not sure what to do
now.
If it works and your data set is small enough that it’s happy and
quick, then stick with it. If you’re having speed problems, then think
about writing something custom.
Definitely don’t just rewrite something because that’s what all the
cool kids are doing!
I’m with Tom. Until I actually start seeing a performance impact. I
currently have tens of thousands of rows, not millions.
If I recall, the documentation says to perform SQL row count instead
of fetching rows when getting the items_count. I wonder if people used
this approach and still seeing performance issues with large row set.
Can anyone confirm the behavior of ac.save? I mean what happens when a
model is retrieved and a subset attributes are modified and then saved?
I have the impression every field in the row is updated regardless, even
if the field had not changed. This seems not efficient and can cause a
dirty-write in some situations.
Does ac.save support field-specific updates? If so how…
If it works and your data set is small enough that it’s happy and
quick, then stick with it. If you’re having speed problems, then think
about writing something custom.
Definitely don’t just rewrite something because that’s what all the
cool kids are doing!
I’m looking at scaling issues from the width dimension rather than the
depth dimension. I have a table that has 143 columns which are split
amongst 7 data input screens and I am thinking that it would be
faster/less memory intensive to only retrieve the specific fields
necessary for each particular input screen and of course, the list view.
Can anyone confirm the behavior of ac.save? I mean what happens when a
model is retrieved and a subset attributes are modified and then saved?
I have the impression every field in the row is updated regardless, even
if the field had not changed. This seems not efficient and can cause a
dirty-write in some situations.
Does ac.save support field-specific updates? If so how…
The entire record is always saved. Add a lock_version column to enable
optimistic locking.
Can anyone confirm the behavior of ac.save? I mean what happens when a
model is retrieved and a subset attributes are modified and then saved?
I have the impression every field in the row is updated regardless, even
if the field had not changed. This seems not efficient and can cause a
dirty-write in some situations.
Does ac.save support field-specific updates? If so how…
You’ll break validation… You could override update_attribute (which
doesn’t do validation anyway).
I’m with Tom. Until I actually start seeing a performance impact. I
currently have tens of thousands of rows, not millions.
If I recall, the documentation says to perform SQL row count instead
of fetching rows when getting the items_count. I wonder if people used
this approach and still seeing performance issues with large row set.
Should I be concerned…?
Long
Getting a count of ALL rows shouldn’t be expensive - mysql caches it,
and I think PostgreSQL also started caching it. Counts WITH condition
clauses can be expensive if there are a lot of rows.
Joe
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.