Re: Problem with index in OR'd expression
От | Ragnar |
---|---|
Тема | Re: Problem with index in OR'd expression |
Дата | |
Msg-id | 1167687210.6369.403.camel@localhost.localdomain обсуждение исходный текст |
Ответ на | Re: Problem with index in OR'd expression (postgresql.org@tgice.com) |
Список | pgsql-general |
On mán, 2007-01-01 at 14:21 -0600, postgresql.org@tgice.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
В списке pgsql-general по дате отправления: