On Tue, Nov 24, 2015 at 7:53 AM, Peter Geoghegan <p...@heroku.com> wrote: > * How do other people feel about this? Personally, I've seen enough > problems of this kind in the field that "slippery slope" arguments > against this don't seem very compelling.
I also always felt there should be some kind of ??? symbol to represent a list of constants. In my experience these lists are actually *more* likely to be variables being inlined than single constants since it's easy to use :1 etc for single constants and quite a bit trickier to do it for lists. I guess that might be changed these days since I think you can do =any(?::int) and construct an array literal as a parameter. But plenty of code actually constructs lists of question marks to interpolate. I have also seen code where I would have needed *not* to have this jumbling though. I think this is a general problem with jumbling that there needs to be some kind of intelligence that deduces when it's important to break out the statistics by constant. In my case it was an IN query where specific values were very common but others very rare. Partial indexes ended up being the solution and we had to identify which partial indexes were needed. Incidentally there's another feature pg_stat_statements *really* needs. A way to convert a jumbled statement into one that can be prepared easily. The use of ? instead of :1 :2 etc makes this a mechanical but annoying process. Adding ??? would make it even more annoying. Even just a function that does this (and takes an optional list of counts for lists I guess?) would be a big help. -- greg -- Sent via pgsql-hackers mailing list (email@example.com) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers