i don’t wann disappoint, but i think you’ll have to query the whole
entry “very long contents” and cut off the tail.
GetsomePart.Big_Row[0…3]
if anyone knows a better solution (one that offers more performance),
let me know.
Well I don’t know if it’s a good idea, probably database dependent
etc. etc. but Foo.find some_id, :select => ‘substring(bar,0, 5) as
bar, id, …’
Database almost certainly still needs to go and load that entire
column so I doubt it will make a huge difference.
i don’t wann disappoint, but i think you’ll have to query the whole
entry “very long contents” and cut off the tail.
GetsomePart.Big_Row[0…3]
if anyone knows a better solution (one that offers more performance),
let me know.
Well I don’t know if it’s a good idea, probably database dependent
etc. etc. but Foo.find some_id, :select => ‘substring(bar,0, 5) as
bar, id, …’
Database almost certainly still needs to go and load that entire
column so I doubt it will make a huge difference.
Fred
Would you please tell more details on this solution? Fred I’m not
clearly understand this.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.