| From: | Dan Sugalski <dan(at)sidhe(dot)org> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Speeding up LIKE with placeholders? |
| Date: | 2004-09-10 21:23:37 |
| Message-ID: | a06110407bd67cb88261e@[172.24.10.164] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
At 5:19 PM -0400 9/10/04, Tom Lane wrote:
>Dan Sugalski <dan(at)sidhe(dot)org> writes:
>> I'd figure, though, that since the parameters are being passed
>> into PQexecParams basically to get them out of band so I don't have
>> to deal with escaping, quoting, and suchlike things, that the
>> optimizer would look at things *after* the substitution was done.
>
>You'd figure wrong :-(. The present mechanism for the LIKE-to-index
>optimization requires the LIKE pattern to be a pure, unadulterated constant.
Well. Darn.
Would I regret it if I asked where in the source this lies so I could
go fix it?
--
Dan
--------------------------------------it's like this-------------------
Dan Sugalski even samurai
dan(at)sidhe(dot)org have teddy bears and even
teddy bears get drunk
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Kevin Murphy | 2004-09-10 21:39:31 | how to constrain a query to return 1 or 0 rows (or >1 or 0 rows) |
| Previous Message | Tom Lane | 2004-09-10 21:19:22 | Re: Speeding up LIKE with placeholders? |