"Jeroen T. Vermeulen" <[EMAIL PROTECTED]> 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 ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly