Jian Lin wrote:
> 
> oh sorry i should have clarified... the length is actually the count of 
> words... so length > 3 means 3 words at least.  or i might do a query 
> that is word > 5 or 7... so will having an column and an index make it 
> fast if i do query such as length > 7?  i intend for example to get back 
> only 5% or 3% of all records so the index might make it fast.

Ah, yes, that makes it different :)

> by the way, the 75 second is the time from the moment the
> 
> Phrase.transaction do
> 
> to the end of it...  so... i think during that time it is mostly IO 
> time...

OK, just need to look at the CPU time used then.

Is this Windows or Linux or something else?

> let me actually write up a test case with some dummy data to simulate it 
> so that every one is on the same ground...

That would be the best of all. I can run your code with your sample data 
against MySQL and Postgres to give you some ideas. I don't really know 
much about sqlite, but I must admit I'm curious as to where the time has 
gone in such an apparently simple situation.

Don't forget to include the database definition and data as well as the 
code.

Cheers,
Gary.

--~--~---------~--~----~------------~-------~--~----~
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