I have a small app that has a single Jquery Autocomplete field. It seems very slow and spotty (not returning all the results it should) on Heroku. It does work but not very well.
Is this due to the differences in databases between here and Heroku? The call for the autocomplete is: ProgramName.find(:all, :conditions => ['name LIKE ?', "%#{params[:q]}%"])
Is it due to a query limit (I am the only person using it at the moment).
> I have a small app that has a single Jquery Autocomplete field. It > seems very slow and spotty (not returning all the results it should) > on Heroku. It does work but not very well.
> Is this due to the differences in databases between here and Heroku? > The call for the autocomplete is: > ProgramName.find(:all, :conditions => ['name LIKE ?', "%#{params[:q]}%"])
> Is it due to a query limit (I am the only person using it at the moment).
Are you using MySQL to develop locally instead of Postgres? MySQL considers LIKE case insensitive, you need to use ILIKE on postgresql to get the same behavior.
-Nick
On Tue, Jan 26, 2010 at 10:20 AM, Sunny Beach <sunnybeach1...@gmail.com>wrote:
> On Jan 25, 11:20 pm, Sunny Beach <sunnybeach1...@gmail.com> wrote: > > I have a small app that has a single Jquery Autocomplete field. It > > seems very slow and spotty (not returning all the results it should) > > on Heroku. It does work but not very well.
> > Is this due to the differences in databases between here and Heroku? > > The call for the autocomplete is: > > ProgramName.find(:all, :conditions => ['name LIKE ?', "%#{params[:q]}%"])
> > Is it due to a query limit (I am the only person using it at the moment).
> > Any ideas?
> > Thanks, > > Sunny
> -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscribe@googlegroups.com<heroku%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en.
On Tue, Jan 26, 2010 at 10:23 AM, Nick Quaranto <n...@quaran.to> wrote: > Are you using MySQL to develop locally instead of Postgres? MySQL considers > LIKE case insensitive, you need to use ILIKE on postgresql to get the same > behavior.
> -Nick
> On Tue, Jan 26, 2010 at 10:20 AM, Sunny Beach <sunnybeach1...@gmail.com> > wrote:
>> I have narrowed down the problem to capitalization. If the query >> string matches up (exactly) then all is well.
>> On Jan 25, 11:20 pm, Sunny Beach <sunnybeach1...@gmail.com> wrote: >> > I have a small app that has a single Jquery Autocomplete field. It >> > seems very slow and spotty (not returning all the results it should) >> > on Heroku. It does work but not very well.
>> > Is this due to the differences in databases between here and Heroku? >> > The call for the autocomplete is: >> > ProgramName.find(:all, :conditions => ['name LIKE ?', >> > "%#{params[:q]}%"])
>> > Is it due to a query limit (I am the only person using it at the >> > moment).
>> > Any ideas?
>> > Thanks, >> > Sunny
>> -- >> You received this message because you are subscribed to the Google Groups >> "Heroku" group. >> To post to this group, send email to heroku@googlegroups.com. >> To unsubscribe from this group, send email to >> heroku+unsubscribe@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/heroku?hl=en.
> -- > You received this message because you are subscribed to the Google Groups > "Heroku" group. > To post to this group, send email to heroku@googlegroups.com. > To unsubscribe from this group, send email to > heroku+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/heroku?hl=en.
Well...there's a good reason MySQL is generally more popular -- Postgresql may be faster/more features, but boy is it a pain to configure locally (at least last I checked), compared to MySQL where it's basically install, set root password, and you're golden. (Obviously you need to create non-root users, but that's straightforward)
On Jan 26, 7:29 am, Sunny Beach <sunnybeach1...@gmail.com> wrote:
> Many thanks, that seems to make everything work!
> Sunny
> ps. yes, I should be using postgres locally.
> On Tue, Jan 26, 2010 at 10:23 AM, Nick Quaranto <n...@quaran.to> wrote: > > Are you using MySQL to develop locally instead of Postgres? MySQL considers > > LIKE case insensitive, you need to use ILIKE on postgresql to get the same > > behavior.
> > -Nick
> > On Tue, Jan 26, 2010 at 10:20 AM, Sunny Beach <sunnybeach1...@gmail.com> > > wrote:
> >> I have narrowed down the problem to capitalization. If the query > >> string matches up (exactly) then all is well.
> >> On Jan 25, 11:20 pm, Sunny Beach <sunnybeach1...@gmail.com> wrote: > >> > I have a small app that has a single Jquery Autocomplete field. It > >> > seems very slow and spotty (not returning all the results it should) > >> > on Heroku. It does work but not very well.
> >> > Is this due to the differences in databases between here and Heroku? > >> > The call for the autocomplete is: > >> > ProgramName.find(:all, :conditions => ['name LIKE ?', > >> > "%#{params[:q]}%"])
> >> > Is it due to a query limit (I am the only person using it at the > >> > moment).
> >> > Any ideas?
> >> > Thanks, > >> > Sunny
> >> -- > >> You received this message because you are subscribed to the Google Groups > >> "Heroku" group. > >> To post to this group, send email to heroku@googlegroups.com. > >> To unsubscribe from this group, send email to > >> heroku+unsubscribe@googlegroups.com. > >> For more options, visit this group at > >>http://groups.google.com/group/heroku?hl=en.
> > -- > > You received this message because you are subscribed to the Google Groups > > "Heroku" group. > > To post to this group, send email to heroku@googlegroups.com. > > To unsubscribe from this group, send email to > > heroku+unsubscribe@googlegroups.com. > > For more options, visit this group at > >http://groups.google.com/group/heroku?hl=en.