Message from discussion
Autocomplete slow on Heroku
X-BeenThere: heroku@googlegroups.com
Received: by 10.224.88.1 with SMTP id y1ls921172qal.3.p; Tue, 26 Jan 2010
07:23:02 -0800 (PST)
Received: by 10.224.71.130 with SMTP id h2mr460018qaj.27.1264519381616;
Tue, 26 Jan 2010 07:23:01 -0800 (PST)
Received: by 10.224.71.130 with SMTP id h2mr460017qaj.27.1264519381573;
Tue, 26 Jan 2010 07:23:01 -0800 (PST)
Return-Path: <n...@quaran.to>
Received: from qw-out-2122.google.com (qw-out-2122.google.com [74.125.92.24])
by gmr-mx.google.com with ESMTP id 25si1628326qyk.3.2010.01.26.07.23.01;
Tue, 26 Jan 2010 07:23:01 -0800 (PST)
Received-SPF: neutral (google.com: 74.125.92.24 is neither permitted nor denied by best guess record for domain of n...@quaran.to) client-ip=74.125.92.24;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 74.125.92.24 is neither permitted nor denied by best guess record for domain of n...@quaran.to) smtp.mail=n...@quaran.to
Received: by qw-out-2122.google.com with SMTP id 5so116406qwi.19
for <heroku@googlegroups.com>; Tue, 26 Jan 2010 07:23:01 -0800 (PST)
MIME-Version: 1.0
Received: by 10.229.107.32 with SMTP id z32mr4550932qco.81.1264519380597; Tue,
26 Jan 2010 07:23:00 -0800 (PST)
In-Reply-To: <a322247a-1b5d-4187-b6d5-dabf8adaee52@21g2000yqj.googlegroups.com>
References: <530d48e51001252020j1bf765bau11e3ed0da78215b0@mail.gmail.com>
<a322247a-1b5d-4187-b6d5-dabf8adaee52@21g2000yqj.googlegroups.com>
Date: Tue, 26 Jan 2010 10:23:00 -0500
Message-ID: <e81d4f0a1001260723m3718f0dal22a20ae3340437ce@mail.gmail.com>
Subject: Re: Autocomplete slow on Heroku
From: Nick Quaranto <n...@quaran.to>
To: heroku@googlegroups.com
Content-Type: multipart/alternative; boundary=00235429d8fc7dfb38047e12dcb7
--00235429d8fc7dfb38047e12dcb7
Content-Type: text/plain; charset=ISO-8859-1
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.
>
> BAD:
> http://content-tracker.heroku.com/program_names.js?q=inter
>
> GOOD: (finds three "International..." programs)
> http://content-tracker.heroku.com/program_names.js?q=Inter
>
> I have not been able to figure out how to fix this.
>
> You can see the full list of programs (only 20 currently):
> http://content-tracker.heroku.com/program_names.js
>
> Sunny
>
>
> 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.
>
>
--00235429d8fc7dfb38047e12dcb7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
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.<br><br>-Nick<br><br><div class=3D"gmail_quote">On Tue, Jan 26, 2=
010 at 10:20 AM, Sunny Beach <span dir=3D"ltr"><<a href=3D"mailto:sunnyb=
each1...@gmail.com">sunnybeach1...@gmail.com</a>></span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"border-left: 1px solid rgb(204, =
204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have narrowed d=
own the problem to capitalization. If the query<br>
string matches up (exactly) then all is well.<br>
<br>
BAD:<br>
<a href=3D"http://content-tracker.heroku.com/program_names.js?q=3Dinter" ta=
rget=3D"_blank">http://content-tracker.heroku.com/program_names.js?q=3Dinte=
r</a><br>
<br>
GOOD: (finds three "International..." programs)<br>
<a href=3D"http://content-tracker.heroku.com/program_names.js?q=3DInter" ta=
rget=3D"_blank">http://content-tracker.heroku.com/program_names.js?q=3DInte=
r</a><br>
<br>
I have not been able to figure out how to fix this.<br>
<br>
You can see the full list of programs (only 20 currently):<br>
<a href=3D"http://content-tracker.heroku.com/program_names.js" target=3D"_b=
lank">http://content-tracker.heroku.com/program_names.js</a><br>
<font color=3D"#888888"><br>
Sunny<br>
</font><div><div></div><div class=3D"h5"><br>
<br>
On Jan 25, 11:20=A0pm, Sunny Beach <<a href=3D"mailto:sunnybeach1...@gma=
il.com">sunnybeach1...@gmail.com</a>> wrote:<br>
> I have a small app that has a single Jquery Autocomplete field. It<br>
> seems very slow and spotty (not returning all the results it should)<b=
r>
> on Heroku. It does work but not very well.<br>
><br>
> Is this due to the differences in databases between here and Heroku?<b=
r>
> The call for the autocomplete is:<br>
> ProgramName.find(:all, :conditions =3D> ['name LIKE ?', &qu=
ot;%#{params[:q]}%"])<br>
><br>
> Is it due to a query limit (I am the only person using it at the momen=
t).<br>
><br>
> Any ideas?<br>
><br>
> Thanks,<br>
> Sunny<br>
<br>
--<br>
You received this message because you are subscribed to the Google Groups &=
quot;Heroku" group.<br>
To post to this group, send email to <a href=3D"mailto:heroku@googlegroups.=
com">heroku@googlegroups.com</a>.<br>
To unsubscribe from this group, send email to <a href=3D"mailto:heroku%2Bun=
subscribe@googlegroups.com">heroku+unsubscribe@googlegroups.com</a>.<br>
For more options, visit this group at <a href=3D"http://groups.google.com/g=
roup/heroku?hl=3Den" target=3D"_blank">http://groups.google.com/group/herok=
u?hl=3Den</a>.<br>
<br>
</div></div></blockquote></div><br>
--00235429d8fc7dfb38047e12dcb7--