I would like to ask you this question
suppose that I've 1 record which contains very long contents like
Big_Row_Table
I would like to ask you this question
suppose that I've 1 record which contains very long contents like
Big_Row_Table
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.
MaD wrote:
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.
Thx , Mad
Any other solution?
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
You could have another column in the table, containing the short version.
Would you please tell more details on this solution? Fred I'm not
clearly understand this.
There's not a whole lot to it - use a select clause to control what is
fetched by the database.
Fred