| From: | Ragnar <gnari(at)hive(dot)is> |
|---|---|
| To: | postgresql(dot)org(at)tgice(dot)com |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Problem with index in OR'd expression |
| Date: | 2007-01-01 21:33:30 |
| Message-ID: | 1167687210.6369.403.camel@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On mán, 2007-01-01 at 14:21 -0600, postgresql(dot)org(at)tgice(dot)com wrote:
> Within the context of the function (after calling), these variables are
> constant and I'm attempting to use my OR syntax as shorthand to avoid
> having to use a dynamic statement *only* because of this situation.
> As I've mentioned, this approach seems to work with MSSQL 6.5+, which I
> assume we consider as a valid competitor to PG... if this didn't work
> anywhere else, I probably wouldn't even have brought it up.
>
> I'll re-iterate another question I attempted to pose which was: what
> have other PG application developers done in this situation? Is it most
> common to just use dynamic statements?
ps/pgsql will prepare the statement caching the plan for
subsequent calls, thus making this not easily optimized.
to avoid this in ps/pgsql , I believe it is common to to make
the statement dynamic by using EXECUTE, thus in effect making
sure the query is planned each time.
gnari
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Ken Winter | 2007-01-01 21:45:52 | How to convert "money" columns to "numeric"? |
| Previous Message | Adrian Klaver | 2007-01-01 21:24:52 | Re: Installing support for python on windows |