On Fri, Mar 13, 2009 at 1:11 PM, Mike C <[email protected]> wrote: > > Thanks, that makes things clearer. But how big is big? I don't plan on > my app being hugely popular, but would thousands of entries be ok? Is > there an area where LIKE starts to be really slow? > Depending on the speed of your hardware and the performance of your database I would look for other ways to search if you have more than a 1000 rows or two. I have a postgres database here with an accounts table with 1810 rows. A LIKE search for names like '%ce% returned no rows in 25 ms. I have a jobs table with 5.3 million rows and the same search took 28 seconds to return no rows.
Of course, if your database caches searches and you do the same search repetitively they will get faster and faster. I guess I would not worry about a few thousand rows. Get you app working, passing all tests, then worry about optimizations. Cheers-- Charles --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

