Frederick Cheung wrote:
> On 3 Feb 2009, at 07:48, 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.
> 
> 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.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to