Re: Optimizing prepared statements
От | Gregory Stark |
---|---|
Тема | Re: Optimizing prepared statements |
Дата | |
Msg-id | 877j0kwtws.fsf@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Optimizing prepared statements ("Jeroen T. Vermeulen" <jtv@xs4all.nl>) |
Ответы |
Re: Optimizing prepared statements
|
Список | pgsql-hackers |
"Jeroen T. Vermeulen" <jtv@xs4all.nl> writes: > Oh, sorry--I guess I haven't been too systematic about it. In the > algorithm's current incarnation, ... Thanks, that cleared things up enormously. I'm trying to figure how it would react to some of the queries I've written in the past. In particular I'm thinking of queries like WHERE (? OR category = ?) AND (? OR cost < ?) AND (? OR description like ?||'%') Where I then pass flags in from the application to indicate which search constraints to apply. If it notices that most searches are for a particular set of constraints it would be able to cache plans with the unused constraints removed. It would not however be able to notice that the last parameter never contains a % and therefore can use an index scan. I'm also wondering how this interacts with plan stability. Obviously the direct effect is to throw out any chance of it. But in the long run they may be two complementary sides of the same thing. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-hackers по дате отправления: